Q
QuickHare
Hi. I have an Access 2002 database, which I am very new to. Basically, I have
three fields of interest in a table. As examples, I'll call the fields "User",
"Number" and "Status". This is in a table called "CoreData".
Now, I have a very simple 'switchboard' which allows the user to enter their
user ID in the User textbox and then click buttons based on what they wish to
view. The main view at the moment is their records (ie, filtered to show only a
certain value of User) to allow them to update data. As this involves a view of
the table, I have used a query which uses the value of the form's textbox as a
criteria. The form, and textbox, are visible and will be using VBA to validate
the box contains a valid entry before the query is run.
Now. The problem is I am having trouble using it in the query. I have the User
field invisible in the query with the criteria "[Forms]![Form1]![txtUserID]",
but when I run it there is no data showing. The speech marks are not present in
the actual criteria. Is there a simple way to get this to work?
Also, as a second question, as the User field is hidden, is there a way to
auto-populate it with the contents of the textbox when a record is added? I
imagine a default value of the field being something like
[Forms]![Form1]![txtUserID]?
The data is shown in a Datasheet, and I am not too proficient on Access to work
this out myself. Any help?
Thanks in advance.
three fields of interest in a table. As examples, I'll call the fields "User",
"Number" and "Status". This is in a table called "CoreData".
Now, I have a very simple 'switchboard' which allows the user to enter their
user ID in the User textbox and then click buttons based on what they wish to
view. The main view at the moment is their records (ie, filtered to show only a
certain value of User) to allow them to update data. As this involves a view of
the table, I have used a query which uses the value of the form's textbox as a
criteria. The form, and textbox, are visible and will be using VBA to validate
the box contains a valid entry before the query is run.
Now. The problem is I am having trouble using it in the query. I have the User
field invisible in the query with the criteria "[Forms]![Form1]![txtUserID]",
but when I run it there is no data showing. The speech marks are not present in
the actual criteria. Is there a simple way to get this to work?
Also, as a second question, as the User field is hidden, is there a way to
auto-populate it with the contents of the textbox when a record is added? I
imagine a default value of the field being something like
[Forms]![Form1]![txtUserID]?
The data is shown in a Datasheet, and I am not too proficient on Access to work
this out myself. Any help?
Thanks in advance.