Two Text Box required to save the record, But an error message appears "No current record" if one of them not filled (1 Viewer)

Hisoka

New member
Local time
Today, 12:46
Joined
Sep 20, 2023
Messages
17
Hello,
I have these three tables:

1.png
2.png
3.png

And this is the relationship between them:

4.png

And this is what the form looks like:
5.png

There are two text boxes required to save the record, which are Mobile and The Order Each one is in a different Table.
When I open the form and fill in the Mobile without The Order, everything is fine, As I receive a message stating that I must fill The Order to save the record.

But when I fill The Order and do not for Mobile, I receive a message: "No current record", and another message: "Update or CancelUpdate without AddNew or Edit."

I tried a lot to find a solution to this problem, or at least find out why this is happening, but to no avail.
Is the problem in the structure of the tables?
or in the relationship?
or in the form itself, or what?

I hope my question is clear and Forgive me for my poor language.
The file has been attached. Thank you in advance guys...
 

Attachments

  • Customer Order.accdb
    2.5 MB · Views: 68

theDBguy

I’m here to help
Staff member
Local time
Today, 04:46
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

You would do yourself a favor and save a lot of headaches if you simplify your form and only allow it to update one table at a time.
 

Hisoka

New member
Local time
Today, 12:46
Joined
Sep 20, 2023
Messages
17
Thank you @theDBguy ,

Regarding to your suggestion sometimes my work requires speed, as I want to registration the Customer and his request with one form,
And therefore the form must send the customer’s info and his order to the appropriate tables....

Excuse me because I am a newbie in Access and I am still learning
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:46
Joined
Oct 29, 2018
Messages
21,473
Thank you @theDBguy ,

Regarding to your suggestion sometimes my work requires speed, as I want to registration the Customer and his request with one form,
And therefore the form must send the customer’s info and his order to the appropriate tables....

Excuse me because I am a newbie in Access and I am still learning
Speed or ease of data entry can be considered and yet still have a very functional and simple form design. Otherwise, just thinking about speed could result in complex forms that only present confusion and problems.

Try following the simple principles first, and you should be able to improve your form designs over time. Since tables are separate, forms should be separate too. I haven't looked at your attachment, so I can't say whether you are using one form or many (one for each table). You know you have a simple form if the form is bound only to a single table. Otherwise, try to change your form design to achieve that first.
 

Hisoka

New member
Local time
Today, 12:46
Joined
Sep 20, 2023
Messages
17
Speed or ease of data entry can be considered and yet still have a very functional and simple form design. Otherwise, just thinking about speed could result in complex forms that only present confusion and problems.

Try following the simple principles first, and you should be able to improve your form designs over time. Since tables are separate, forms should be separate too. I haven't looked at your attachment, so I can't say whether you are using one form or many (one for each table). You know you have a simple form if the form is bound only to a single table. Otherwise, try to change your form design to achieve that first.

Thanks for the advices and clarification, I will try to using sub forms to solve this problem as "Eugene-LS" suggested
 

Hisoka

New member
Local time
Today, 12:46
Joined
Sep 20, 2023
Messages
17
Try use sub forms
Thanks @Eugene-LS You are life saver :D...

I liked the idea very much, But I did not know how to create a new records, As when I try to create a new record, Nothing appears on the subform (Customer & Order).
In my case, it must appear so that I can fill the Customer number and Order to save record then send them to the appropriate tables....
 

Users who are viewing this thread

Top Bottom