Passing data to query from form driving me insane!

chris89

Registered User.
Local time
Today, 13:39
Joined
Nov 28, 2011
Messages
71
Ok sorry guys for the continous asking but WHAT IS GOING ?
I use a form to pass data in a query's criteria !
I use
Code:
[Forms]![Myform]![FormCommand]
in the criteria row.So when I open it, it prompts for the value of [Forms]![Myform]![FormCommand].Now I closed Access(2007) and when I opened it ,I got the security warning and didn't enable the content and fired up the form-query and it worked :confused::confused::confused:.
Then when I enabled content ,the query asked for [Forms]![Myform]![FormCommand] again.
I have no VBA code yet in the whole database.

Anyone knows something about this issue?
 
Is your Form (Myform) open when you open the query.

I'm also presuming that you are using Myform and FormCommand as generic examples and you have, in fact, changed those two generic values to match the reality of your DB.
 
Just to add that besides your form being open before you open the query, the form also needs to stay open and can only be closed after you close your query.
 
MyForm and FormCommand used just to give an example!
And yes the form is open when I run the query.I also tried to update a combobox based on other and used in the Row Source of the second combo in the criteria row the same
Code:
[Forms]![Myform]![FormCommand]
.
Then when I open the form it prompts for value for [Forms]![Myform]![FormCommand]...
What am I doing wrong?
 
Double checked and the same thing happens !!
When I open Access 2007 with security content disabled I can pass data from a form to a query , (or a combobox data to another combobox ) but when I enable content a get a prompt for value ??
 
I have managed to fix it by rebuilding it from scratch.
Weird issue though!

Thanks for your replies
 
Good to hear chris89!

If you still upload the db you had problems with we might be able to tell you the root cause.
 

Users who are viewing this thread

Back
Top Bottom