autofill field

churcr

New member
Local time
Today, 13:42
Joined
Jul 16, 2006
Messages
3
I have a field that I want to autofill. The data to autofill comes from a query and can be any 1 of 3 different pieces of data depending on a option box on the form. Here is what I want to do but I can't figure out how.

1. I have an option box with three different boxes.
2. After selecting 1 of the options, I want to capture what option was selected.
3. I have 3 different queries. One for each possible option box. I want to take the capurted option and use it to open one of the queries.
4. After selecting the correct query, I want to copy one field in the query into a text box on the main forum.

Any help would be appreciated.
 
Firstly you'll need your three queries to be append or update queries depending on what stage you are at with your data entry.

Then you will need to have a command button or some other trigger that will test which of the options have been selected and run the appropriate query.

Then last of all you will have to refresh the form so that the data that the queries have appended/updated becomes visible in the form.
 
Thanks for the suggestion but that is not the method I want to use. I want to use code in the after update property on the toggle box.
 
I think you'll find you will need to use code to achieve what I have suggested.
 
you could probably use Dlookup to pull the data from the query

Peter
 
Peter, you are awsome. I've been at this for over a week. I created a bunch of queries and tried to get the data using openquery and applyfilter. Everytime I tried, I just got errors and couldn't get the field to autofill. I compltely forgot about Dlookup. I simply pulled the data from the original table using Dlookup and was able to delete all the queries. Thank you so much for your help.

Rick

Bat17 said:
you could probably use Dlookup to pull the data from the query

Peter
 
Glad to help :)
we all get those 'wood for trees' moments LOL

Peter
 

Users who are viewing this thread

Back
Top Bottom