Sorting a form based on query gives error

T

Tony

I have a form based on a table that isn't sorted so I created a query and
sorted it. On the form, I have a combo box which populates from the query and
I've sorted a field in the in the said query. The combo box control source is
AuthorTbl_ID, which is a lookup field to the Author table and stores the
Author ID. I can't sort on the Author ID so I've sorted the query I made on
the Author LastName. When I get back to the form, I get the error message "
You tried to assign the null value to a variable that is not a Variant data
type." I've tried to change the data type, tried to sort the form via the
Order By property, and via VB OrderBy all to no avail. Difficult to explain
this. I wish I could upload the form where it would make sense. Any
suggestions are appreciated.
Many thanks,
Tony
 
E

Eric Blitzer

I am not sure what you are doing but why don't you base the form on the query
with the correct sorting?
 
T

Tony

That would seem to be the obvious answer, but when I do that I get the error
message. So basing the form on the query doesn't help.
 

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