tried to assign the Null value to a variable that isn't a variant type - combo

hjgwright

Registered User.
Local time
Today, 00:31
Joined
Jul 11, 2002
Messages
14
hi.
I've got a form with a subform. The subform contains company information. The NotInList event is set to open up the Company form in order for you input the company details. It then requeries the combo and finds the information you just entered, and applies it to the fields.
However, when I enter a name, then delete it, it comes up to say
'You tried to assign the Null value to a variable that isn't a variant type'.
I have tried to put if null etc in the NotInList section but it doesn't help.

Any ideas?
Thanks.
HW
 
The users of the database complained that this is happening.
I have sorted out the 'NotinList' part of it, so it opens up the Company form.
I don't know why they would keep on deleting a name, perhaps they won't now this is sorted.
I thought there might be an If combo is null bit of code I could put in so that it would open up the Company form if the value was null, anyway, to keep them happy.
Thanks for the reply.
HW
 
Rather than allowing them to delete it, make the controls all required then on the Before_Update check for Null or missing values and not allow them to close the form without filling in all of the fields (I'll plug Rich's Code again here - Sorry Rich) If they have made a mistake, then include a cancel button to undo the form changes and close the form. Link to Rich's Code is here (shame you are not on Comission for this Rich!)
http://www.access-programmers.co.uk...&threadid=30669
 

Users who are viewing this thread

Back
Top Bottom