popup form?

  • Thread starter Thread starter Jamie
  • Start date Start date
J

Jamie

I would like to have a button on a form that will pop up
another form to enter data, (check list) although this
data writes to the same table. what do I need to do to
accomplish this?

Thanks!

~Jamie
 
The first part is easy. On the buttons event procedure use this code:

Call Access.Application.DoCmd.OpenForm(FormName:="Pop Up Form", _
View:=acNormal, _
Datamode:=acFormEdit, _
windowMode:=acDialog)

That will open your second form in pop up mode. The second part of your
question is a little trickier...I'm stuck on a variant of the problem right
now. One thing that you could do is to directly update the table from the
the popup form and then requery the master form after the popup is closed.
Hope that helps.


Jon
 
Isn't that a lot of unecessary code? Couldn't you just set the Popup form
properties in design mode and then just use...

DoCmd.OpenForm "FormName"

I find this much easier. Also over in microsoft.public.access.modulesdaovba
I just answered a post titled "Unbound Forms" that was posted today. My
suggestion there may also help you here in how to open the popup with the
record you want.

For handling the possible write conflict it is right to save the record and
the requery the original form, however you should save the record in the
original form before opening the popup to avoid conflicts when saving the
record in the popup.

Just my two cents.
Tony
 
All true. Thanks for the conversation! The reason I posted it the other way
is that I usually include at least most of the optional parameters (i.e. the
useful ones) as I find that keeps my mind sharp as to what can be changed at
run time and leads to better code reuse. Having said that...it might be more
confusing than helpful if someone's not hip to all those parameters which
admittedly can sometimes be a minefield.

I read your other post...looks good...rock on!

Jon
 
Back
Top