"button" / form not working

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...
 
E

espee2

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?
 
E

espee2

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!!!!
 
X

XPS350

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
 
R

railcrew

Add an extra command:

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

Groeten,

Peterhttp://access.xps350.com

That did it!! Thanks a million!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top