Form field using query resluts

jamphan

Registered User.
Local time
Today, 05:53
Joined
Dec 28, 2004
Messages
143
I have a form that is linked to a table. I would like to have a field on my form that has a control source of a query I have. There are cbos on my form that control the output of the query so I would like for the query to run after all 3 cbos have the data selected and then this form field linked to the query to update. The 2 problems are:

1. How to link this field to the query
2. How to get this field to update after the cbos have been selected.
 
hi jamphan -

The usual approach relies on some Visual Basic. You can use the AfterUpdate even for each combo box to check what data is selected and build a query using the data.

Check out this thread http://www.access-programmers.co.uk/forums/showthread.php?t=98061
for some of the discussion.

So,
1. The field is either linked an existing query or just has the value placed in it using VBA
2. The field is updated by VBA code that is triggered using the AfterUpdate event.

hope that helps,

- g
 

Users who are viewing this thread

Back
Top Bottom