Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Sorting a form based on query gives error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony - 05 May 2007 19:32 GMT
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
Eric Blitzer - 06 May 2007 04:27 GMT
I am not sure what you are doing but why don't you base the form on the query
with the correct sorting?

> 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
[quoted text clipped - 9 lines]
> Many thanks,
> Tony
Tony - 06 May 2007 13:29 GMT
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.

> I am not sure what you are doing but why don't you base the form on the query
> with the correct sorting?
[quoted text clipped - 12 lines]
> > Many thanks,
> > Tony
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.