Details won't open on "double click"

remcopeters

Registered User.
Local time
Today, 12:40
Joined
Dec 3, 2012
Messages
31
I got a form called "Producten" (Dutch for 'products'). This contains an overview of all products.
What I want is that another form ("producten - details", dutch for "products - details") opens when the "artikelcode"-field (artikelcode is Dutch for "articlecode) for a product is double-clicked.

This works on the form "Klanten" (Dutch for 'customers'), but unfortunately not on "producten".

What am I doing wrong?
 

Attachments

The problem is that your form producten Details has a subform whilst your Klanten Details form does not. You will need reference that (the subform) in your where condition. As I never use embedded macros I have no idea what your correct reference should look like :o

Also consider implementing a naming protocol along the lines of FRM_FormName, QRY_QueryName, TBL_TableName. THis will make it clear which object you are referring to when you write code. For example you currently a table and a form both called Klanten :eek: avoid space and other special characters, confine your self to alpha an numeric characters and the underscore.
 
Okay, Well how would the code look like in VBA?
 
To be honest I can't see the point of the sub form as there is no Parent/Child link between the Main and Subforms :confused: It just seems to be needlessly complicating things.

Why not simply open the sub form in which case you could just use;
Code:
DoCmd.OpenForm "Subformulier Producten - details", , , "Artikelcode = " & Me.Artikelcode
 
yes, I agree with you that it makes things needlessly complicated, but I really can't see how to do it otherwise..........?
 
Okay, got it now. I now what you mean. I made a form which I wanted to be the form and embedded that form in another form so I got the form I wanted......hahaha....

I now just took the subform to be the number 1 form.
 

Users who are viewing this thread

Back
Top Bottom