null value- problem with adding a record

dbse uploaded
go to form called clients
go to first tab called main detaills

when i add A new record in the main details tab I get the error message "you tried to assign a null value to a variable that is not a variant data type."
However once i get rid of that message I can continue to add the record...

But thats not right obviously. What is wrong!
current-2-.accdb
topUKlawyerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

als315Commented:
I don't really understand why you like to have subform if it is using same table as main form.
Add clientID to subform and you will see more interesting error message.
You are filtering subform with this ID, but it does not exists for new record.
May be you can put all these fieds to main form without subform?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
als315Commented:
May be this way
current-2-.accdb
0
Jeffrey CoachmanMIS LiasonCommented:
<I don't really understand why you like to have subform if it is using same table as main form.>

Yes, Can you first take a step back and explain your design please?

Your Relationships are very confusing...

...but first see if als315's sample solves your issue.
0
dqmqCommented:
Agree.  Linked subforms are intended for a parent child relationship, but that is not what you have. In your case, both the form and subform have the same record source.  When you add a new client, the child recordsource gets confused on the autonumber column.

Solution 1:  eliminate the subform
Solution 2:  eliminate the autonumber
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.