Combo values from query based on form fields

R

Rose B

I am setting the values for a combo box in a form(s) via a query that
'filters' the results with criteria based upon the values of other fields on
the form. The combo is a field that is bound. However, this is giving all
kinds of problems ranging from Access completely crashing to being asked for
the parameter values of those criteria fields when closing the form. I have
tried making the combo an unbound field and then setting the value of the
bound field to that unbound field after update, but that still leads to the
same issues. How can I do this?

As example - I have a form with ClientID, which the user selects and then
based upon that I will populate the values of a combo box for events which
selects all events attended by that client for which there is a charge. The
user should then select the relevant event and the event number is then
stored in the table underlying the form (which is recording payments made).

The Row Select for the field Event is SELECT Event.EventID, [EventTitle] &
", " & [EventDate] AS EventTitleDate FROM Clients INNER JOIN (Event INNER
JOIN EventAttendee ON Event.EventID=EventAttendee.EventId) ON
Clients.ClientID=EventAttendee.ClientID WHERE (((EventAttendee.Paid)=False)
And ((Event.EventCharge)>0) And
((Clients.ClientID)=Forms!frmClientPaymentEntry.ClientID));

The bound column is 1.

(I have two other forms doing similar things, the more complex one is form
with a continous sub-form which contains a combo with a query behind that
uses two other fields from the subform - if I just enter the main form a few
times in succession it crashes Access!)

Any help gratefully received!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top