New record error!

AlvaroCity

Registered User.
Local time
Today, 04:46
Joined
Jul 16, 2016
Messages
70
Hello everyone!

I bumped into another problem. This time I would like to enter a new record on a navigation form. The problem is that the ID is on the main form whereas the rest of the data is on the tabs.
To make it clearer I recorded a video.

https://youtu.be/HBqOf7h6dC4

I hope you can help me.

Thank you very much.
 
Just create a bound textbox on your navigation form bound to the field on the table and when the form opens make it's default value the value on the main form.
 
Thank you Tieval for your answer

Sorry for my ignorance but I dont really get it.

So I have to create a bound textbox (control source: ClientID) and this bound to the textbox "ClientID" from the main form using the default value?

That being so, I pops up another error when I introduce data.

i hope you can help me.

Thank you
 
Could you post your database with some sample data?
 
When you say that the ID is on the main part of the form and the rest of the data resides in tabs, that alone doesn't mean you can't have a normal bound form. Where you would run into issues is when the information is split across the main form and a sub form. This has nothing to do with whether a tab control exists on the main form. It is still one form, just bigger and more complex than some forms.

For very long records, having a form that has common identifying data in a "main" area and then having tab controls with other controls on the tabs is still a legal way to handle things. Complex, but perfectly legal. Changing the selected tab merely hides or exposes other controls, but if the form overall is bound, it is still the same record. Changing tabs does NOT trigger a "silent save" of your current data. Navigation to another records or creating a new record does that.

If you mis-spoke and really meant "sub form" when you were saying "tabs" then that is a different question. Please clarify.
 
Hello everyone.

First of all, sorry for my ignorance.

I think that my problem might be that the information is split across the main form and the tabs.
I thought that it would be the right way to built my navigation form.

I just have the ID on the "main" form because I have this one linked to 1 of the tabs (link master field and link child field).

Now I know that my form has been wrongly built, I wonder how I can fix it...

Is it possible to place the records on a tab and then link it to the other tab as a subform?

Thank you for everything.
 
Tabs are not subforms and a link between the parent and its tabs is meaningless. It is all one form.

A sub-form CAN exist on one tab and not another one, but here is the pitfall: Out of sight, out of mind. Whether or not the subform is ever viewed by selecting its tab, that sub-form is still open and therefore is part of the "baggage" of the main form. Note that calling it "baggage" could have negative connotations sometimes, but that is not how I am using it here. The sub-form, if it exists, is being dragged along with the main form.

A link between parent form and sub-form DOES make sense (master/child, as you described). Just remember that if you have a relationship declared between the table driving the main form and the table driving the sub-form, and if Relational Integrity is enabled for the two forms, you face the issue on the form that you would also face on the two tables in isolation: The child cannot be updated to contain a record that would be unrelated to the parent. Note also that if you had such a table-level relationships and used the form control wizard to create the sub-form, it would detect the relationship and automatically "do the right thing" with master/child fields as one of the options it gives you on how to link the parent and child forms.
 

Users who are viewing this thread

Back
Top Bottom