Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CANNOT Input- Form with tab controls and sub tab controls

Status
Not open for further replies.

buee04

Technical User
Jun 27, 2002
129
US
Hi!

I have a form called frmInputMain, which allows to step through each record one by one, or add a new record. Because I have many different fields, I was forced to categorize the fields into tab controls and sub tab controls.

Everything works great when you're just viewing the records. All of the fields show up. But the trouble comes when I try to add a new record. I click on cmdAddRecord and I can only add stuff in one control. Meaning that if I type in something for tab1, then i can't go to tab2 or even the subtabs in tab1. Or if I put in something in the subtab1, then i can't add anything into my tab1. The error that comes up is,

"The changes you requested to the table were not successful because they would create duplicate values in the index, prmiary key, or relationship"

or if I type in something in the subtab controls first,

"Index or primary key cannot contain a NULL value".

For inputting a record, the user types in the primary key (ContractNumber), and then the user adds the rest of the data in in the tabs and subtabs.

PLEASE HELP!!
thanks in advance.
 
The above url links to 2 screenshots of my form.

THANKS for looking.
 
Please, any help is greatly appreciated!
 
Open a new form in the design mode and put all your data on one unbound form - you can put much. Thye have an okay button that moves it all to the forms and tabs etc.

forms![main]![field(0)] = me.txtbox1

etc
etc

rollie@bwsys.net
 
Hey long time Rolliee,

I think I understand what you mean but I was able to get around it. I found that I wasn't able to move between tabs, subtabs, forms, and subforms only when I add a new record. But when I'm looking at records already in the db, and edit it, I was able to move between fields. So what I did was add a button on the form that adds the ContractNumber first by navigating one record forward and then back to that record. That way, when it comes back to that record, the user will be editing it rather adding it.

BUT as always, I appreciate your willingness to help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top