Need help with subforms

dakcg

Registered User.
Local time
Today, 21:38
Joined
Aug 24, 2001
Messages
88
Greetings,

I have a quote database, and I have put in a special feature in the product code field-the user double clicks on the product code field, and it brings up the whole product table in a form, that the user and search through. But, the one thing I can not find a way to do is have them double click on the product code they have started to enter, and have it go to that place in the form. Any one know how do that would be done?!?

Thanks in advance for any help
DAK
 
Probably what you are really wanting to do is open the Product information up in a form view rather than a table. If you want to see all the records for the table, you could use a datasheet view form but it would involve a bit more code to move to a specific record and to show ALL the records.

What you want to do is pass the value of the list box (I'm assuming) or whatever and pass it to the form that shows the product info.

Let's say the Listbox value is ProductID and that the PK on the form is ProductID.

On the DoubleClick event of the control which holds a value for ProductID, you want to put code like this:

DoCmd.OpenForm "frmProductFormName",,,"[ProductID] = " & Me.ProductID

You can add the criteria of acFormDS for the first comma separator to open the form to look like a table.

Hope that helps. If not, let me know and I will email you a demo.



[This message has been edited by jwindon (edited 01-25-2002).]
 
Thanks for the reply jwindon,
but could you repeat that, in english? Because, I have to admit, you lost me!!

Sorry for being so dense, but I wouldn't mind an email of a sample. You have my e-mail address right?

Look forward to hearing from you.

DAK


[This message has been edited by dakcg (edited 01-26-2002).]
 

Users who are viewing this thread

Back
Top Bottom