Add New Record --> Mainform & Subforms (1 Viewer)

csappo

New member
Local time
Today, 11:22
Joined
Jan 10, 2008
Messages
1
Hi All,

ANYONE with help I WOULD SO GREATLY APPRECIATE IT. I spent 8 hrs yesterday trying every method possible to figure this out and HAVE HAD NO LUCK.

Here's the scenario:

Mainform> called 'Frm MainScreen"
with form header> Combo list box, drop down to 2 columns (from tbl Client Info), 1- Client_ID (hidden), 2-L.Name, 3-F.Name
also with formheader> commandbtn "Add New Record" <===== :mad: My problem :(

Inside form detail> 6 separate subforms all Client_ID foreign key related but with separate primary keys (1:N relationships). But all thats important to know is that the first subform is all fields from tbl.ClientInfo and the second subform is all fields from tbl.Claims

When I use the control wizard to add the command btn "Add New Record" in the form header, it adds a new record to the active control, which being that it adds a new record to the tbl.Client_Info. VERY GOOD.. BUT! ---After it adds the new record, and it even shows the new primary key unique identifier in the tbl.ClientInfo subform, after i click from the tbl.ClientInfo subform over to the the tbl.Claims subform, it does not follow-suit in adding the new primary key unique indentifier(from tbl.ClientInfo subform) into the related foreign key field in tbl.Claims Subform. THIS as a result, when trying to enter data into the tbl.Claims Subform comes up with such like "Cannot insert null value into dbo_tbl.Claims Subform ---- blah blah blah."


I've checked all my relationships within access. Although because we're running access of an sql backend database, it won't enable any of the checkboxes when u right click any relationship line (connecting two related fields e.g. like above, foreign key tbl.Claims FK.clientID to tbl.ClientInfo.PK.ClientID) within the relationship view, the checkboxes for referential integrity, cascade, etc all all locked and disabled. Could this be the problem?

I tried by right clicking the commandbtn add new client, building teh expression by macro (how it is already predefined in it already) but changing the control to not add a new record to only the active control, but i attempted to build it to make it add a new record to each subform. Would this work?

Any suggestions for taking a look at the SQL Server management relationships?

Also, I have another database created with the exact same setup, with the "add new client" command btn as well, with all subforms exactly like I have it put, and it all works fine. When I look at all the properties not only on the control itself, but all subforms and the main form as well, it is identical to my own forms and subforms, except that this command btn doesn't work for me,?????



HELPPP AND I WILL LOVE YOU ALL!!!!! :D:D:D

csappo@yahoo.com
 

Users who are viewing this thread

Top Bottom