I have a comboxbox which gives a list of recent delivery addresses used by the client which works fine if there are any records, but asks for a parameter if the select distinct rowsource query returns no records because the client hasn’t used a delivery address before.
I’m sure there should be some sort of ‘if is not null’ syntax but has baffled me so far. I want to be able to type an address if there isn’t a suitable (or any) delivery address available, so limit to list is set to false
Failed to find any acceptable syntax for the combobox rowsource propertu to test for this, the current source is:
SELECT DISTINCT qryRecentBookings.[DropAddress] FROM qryRecentBookings
Apriumben is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The problem is not the combobox but your not-shown-here code that expects a value from the combobox.
Apriumben:
@gustav you certainly put me on the right track! whilst looking for
this non-existent code (not shown!)I discovered that the query
‘qryRecentBookings’ referenced a different form and I had in fact
previously created a new query that referenced this form, but hadn’t
applied it to this combo box.The two query names were quite similar
but I clearly should have read the error message more intently. I have
a feeling I previously copied a form used for another purpose,
rejigged the bits I needed to but didn’t check this particular combo
was working. Thank you for making me recheck everything!