Where Condition Help

LHolden

Registered User.
Local time
Today, 11:45
Joined
Jul 18, 2012
Messages
73
Hello all,

I'm very new to Access, and I've run into a small problem. I have a client form, as well as a form which adds new records ('Data Entry' set to 'Yes') for the Clients Table. What I've been trying to do is add a where condition to the macro which closes the new client form (after it has been saved) and re-opens the client form. I want it to bring the end user straight to the record which they have just created, and I've been trying:
WHERE [ClientID]=[forms]![frmNewClient]![ClientID]
but when I do this, I get a popup that says [forms]![frmNewClient]![ClientID]? as if I had entered it as a criteria. I have a 'ClientID' field on both forms (thought they are both invisible if that makes a difference).

Any help would be greatly appreciated. Thanks!
 
The form definitely needs to be open to be read by the query.

I am not quite clear on what you are doing especially as I have never used macros only VBA.

In VBA one might use the Where argument of the OpenForm Method to limit the recordset but would perhaps be more likely to simply change the DataEntry property, requery the already open form and apply a filter.
 
Nevermind! Got it all sorted out.
 

Users who are viewing this thread

Back
Top Bottom