Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup form question

Status
Not open for further replies.

newboy18

MIS
Apr 11, 2003
45
GB
I have 3 tables joined by a query, the results are shown
on a form that is set to continuous and this works OK, my
problem is that I cant fit all the data on 1 line so I
want a "More Info" button on each line that will open a
popup form but when I do this the popup always goes to
the first record, but I want "More Info" about the line
that I selected. I guess I need an event procedure that
will get the record number of the previous form and then
use it on the popup form, ie Docmd.GotoRecord.
Please help I am completly stuck.
 
Assuming you are using DoCmd.OpenForm parms, etc to pop up your form, the last argument is something called OpenArgs which is a free format area for programmer use something like the Tag property in the general case. OpenArgs is not used by Access in anyway.

You can pass the current record key into your popup via OpenArgs and then in your popup load or open code put something like the following:

If Not IsNull(OpenArgs) Then
'Put code to find correct key to sync your record
End If

Another way is to use the filter property in DoCmd.OpenForm. This is used like a Where clause without the Where (eg CustID = 1234).

Good Luck!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top