"button" / form not working

  • Thread starter Thread starter espee2
  • Start date Start date
E

espee2

I made a simple button on one form to open another form. Both forms
are related and work fine manually (without the button) (I just
thought it would save a step) When I open that (second) form with the
button the fields/record are blank, but if I open the (second) form
manually, the fields are as should be. Wha'ts up with that?

I would really like it if, when I open the (second) form with the
button, it will display the same (ProductID) as the first form I was
filling in. but I will settle on just being able to click through the
records to the one I want...
 
Hard to teel what is wrong without knowing the code behind the button.

Anyway, it should look something like:
DoCmd.OpenForm "Form2", , , "ProductID=" & Me.ProductID

--
Groeten,

Peterhttp://access.xps350.com

--- news://freenews.netfront.net/ - complaints: (e-mail address removed) ---

I just used the wizard that pop's up when you add a button with the
toolbar.... where should I put that code?
 
I just used the wizard that pop's up when you add a button with the
toolbar.... where should I put that code?

Duh! I figured out where to put the code and it works fine, BUT... it
only works in "edit" not entry (It won't work if I enter info into
form 1 and press the button, I have to close the form and re-open or
go to another record and come back... any help on that? thanks!!!!
 
Duh! I figured out where to put the code and it works fine, BUT... it
only works in "edit" not entry (It won't work if I enter info into
form 1 and press the button, I have to close the form and re-open or
go to another record and come back... any help on that? thanks!!!!

Add an extra command:

Me.Refresh
DoCmd.OpenForm "Form2", , , "ProductID=" & Me.ProductID


Groeten,

Peter
http://access.xps350.com
 
Add an extra command:

Me.Refresh
DoCmd.OpenForm "Form2", , , "ProductID=" & Me.ProductID

Groeten,

Peterhttp://access.xps350.com

That did it!! Thanks a million!!
 
Back
Top