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 / July 2005

Tip: Looking for answers? Try searching our database.

ERROR - You tried to assign the NULL value to a variabe that is not a Variant data type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott B - 01 Jul 2005 15:04 GMT
Good Morning,

I have a form based on a query.  I am using two fields from the query.  I
have inserted a second form as a subfom.  It is based on a table.  The
subform works fine when I open it by itself, but that will not help me
because I want to have the records associated with the table in the
aforementioned query.  I used the wizard to create the Form/Subform
relationship.  The form/subform looks fine, I but get the following error
message when I try to enter data into the first field in the subform:

"You tried to assign the NULL value to a variabe that is not a Variant data
type"

The main form is not updatable, I use it to know what main form record I am
working on.  I don't know what other info you might need.  I have made
subforms many times before in what I thought was the same way, but I must
have done something different this time.  Any help would be appreciated.  I
checked the data sources in both forms and I checked the Link Child and Link
Master Fields and they seem correct.

One last thing.  I can Ok the error message and go on adding data to the
form.  It accepts the data and if I look at the table the data is there.
But it does not appear in the subform if I close the Form and then reopen
it.  So the linkage must not be right.  I have a relationship set in the
Relationship screen (Tools Menu) and changing the join type does not seem to
make a difference.

Thanks,
Scott B
Dirk Goldgar - 04 Jul 2005 19:32 GMT
> Good Morning,
>
[quoted text clipped - 23 lines]
> relationship set in the Relationship screen (Tools Menu) and changing
> the join type does not seem to make a difference.

I think you're probably right, and the error is in the Link Master/Child
fields, or else in the recordsource of the subform.  Please post the
values of these properties, and also the SQL of the main form's
recordsource.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
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



©2008 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.