My Assistant
![]() ![]() |
|
|
Oct 11 2004, 04:55 AM
Post
#1
|
|
|
UtterAccess Guru Posts: 929 From: Lytham St Annes, Lancashire, UK |
I have a form with a control populated via another form.
Form1..control1..load..form2...control2 ( combo) = control1 of form1. Works fine. The 2nd form's control2 is a combo and another unbound control on the same form (2nd) is populated with the column(n)'s of control2. My problem is, I want the unbound control to reflect the column(n) data as soon as control2/form2 is opened and populated. I have tried requery/refresh in various ways/places without success. When I navigate the record the unbound control displays the details. Where do I put the requery/refresh/recalc (not sure which) to achieve this. Hope I have explained that well enough. |
|
|
|
Oct 11 2004, 05:04 AM
Post
#2
|
|
|
UtterAccess Veteran Posts: 350 From: London |
I would probably put that code in the form's OnCurrent event. That way when the form is opened the control source is already programmed in.
|
|
|
|
Oct 11 2004, 07:10 AM
Post
#3
|
|
|
UtterAccess Guru Posts: 929 From: Lytham St Annes, Lancashire, UK |
The code to populate form2's control is in form1's button to open form 2.
Like so.... 'In the AfterUpdate of form1 DoCmd.OpenForm "frmCQS", , , "[fldQID]=" & Me![Q ID] If Forms!frmcqs!fldQID < 1 'Scruffy this I know but for now it will do. Forms![frmcqs]!fldQID = Me.[Q ID] End If This works fine. When form2 opens fldQID is populated with Q ID. If I put any of this code in in the on current event of form2 then when form2 is opened on it's own it will error on me. I understand where my problem lies. The data placed in Q ID has still to be saved as a record when the form is first opened. I'm just getting a mental block with what to do to get the unbound control which displays Q ID's combobox columns to populate as soon as form2 is opened. Should I simply save the record immediately on opening the form. Sorry if I'm not understanding your reply correctly. Alan |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 01:03 PM |