popup form

edojan

Registered User.
Local time
Today, 02:01
Joined
Dec 19, 2006
Messages
26
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!
 
I'm not sure if this will do what you want. This will open your popup to the specific record if the recordID of your main form is populated, or it will open and allow you to create a new record if there is nothing in recordID of your main form. However, this approach does not allow you to navigate away from the specific record once the form has opened to a specified recordID.

Code:
If Me.RecordID & "" = "" Then
DoCmd.OpenForm "contest", acNormal, , , acFormAdd, acWindowNormal
Else
DoCmd.OpenForm "contest", acNormal, "[RecordID]=" & Me.RecordID, , acFormEdit, acWindowNormal
End if
 
thanks

here is what worked for me:

Code:
' If Not IsNull(DLookup("[PrimaryKeyNameGoesHere]", "TableNameGoesHere", "[PrimaryKey] = " & Me.NameOfControlWithPrimaryKey)) Then
' DoCmd.OpenForm "Contest", , , "[PrimaryKey] = " & Me.NameOfControlWithPrimaryKey
' Else
' DoCmd.OpenForm "Contest", , , , acFormAdd
' End If
 

Users who are viewing this thread

Back
Top Bottom