A pop-up form??

kbrooks

Still learning
Local time
Today, 05:44
Joined
May 15, 2001
Messages
202
I have a combo box set up, and I would like a separate, smaller form to pop up for info depending on the choice they select in the combo box. For example, if they choose "Visitor", I have a form for visitor address and form that I'd like to pop up. Then whatever info they enter in this 2nd form would be stored in the main table.

Is this a subform? I kind of thought a subform was always visible and just set into the main form. Not sure how to start this. Thanks in advance for any help you can give me!
 
Create your 'Vistor' form as a regular form. In the forms property sheet select the Other tab and then set the Popup event to Yes. This will open your form as a Popup. (Search help for Popup and then look for 'Create a popup form...'for more information on the other attributes that you may want to set for his form.) Then in the After Update event you can use code simiar to this to 'popup' your form:

If Me.ComboBoxName = "Visitor" Then
DoCmd.OpenForm "Visitor"
End if
 
Thanks for responding so quickly!
smile.gif


I tried what you suggested but I think I'm doing something wrong. The name of my table containing all fields is IncidentTable. The combo box is called TypeCode, located on a form called IncidentForm. And the form I want to pop up is called VisitorInfoForm.

Based on your suggestion, I entered this:
If IncidentTable.TypeCode="Visitor" Then DoCmd.OpenForm "VisitorInfoForm"
End if

The only problem is that when I open the IncidentForm, the other form pops up immediately, instead of when I choose "Visitor" from the combo box. Any ideas?

Thanks!!!
 
Also, my VisitorInfoForm won't let me add any info to the fields once its open. My allow edits, deletes, etc are set to a YES so I don't quite understand that one. Also it's set to dynaset and not snapshot.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom