Full Version: Popup form linking
UtterAccess Forums > Microsoft® Access > Access Forms
edojan
Hi Guys
Here is my issue i have form opens up with :
DoCmd.OpenForm "contest", acNormal, , , acFormAdd, acWindowNormal
Then i get new records i cant go back and see if there are any previous records.
I want to link new form to old form by recordID. Kinda like subform but this time it has to be popup form not subform but same properties. If there is record is from main form bring up that record(s) in popupform, if not then add new record.
Hope this makes sense.
Thanks!
Jack Cowley
This is UNTESTED AIR CODE - Change object names as necessary....
CODE
If Not IsNull(DLookup("[PrimaryKeyNameGoesHere]", "TableNameGoesHere", "[PrimaryKey] = " & Me.NameOfControlWithPrimaryKey) Then
DoCmd.OpenForm "Contest", , , "[PrimaryKey] = " & Me.NameOfControlWithPrimaryKey
Else
DoCmd.OpenForm "Contest", , , ,acFormAdd
End if

hth,
Jack
edojan
thanks!
Jack Cowley
You are most welcome...
ack
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.