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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Update and Delete records can't Insert new ones??? 1

Status
Not open for further replies.

kellyputty

Technical User
Jul 28, 2005
29
0
0
US
Why if your query can perfectly update and delete records would I have problems inserting a new record. (multiple tables, all one- to- one relationship)
 
For some reason when appending a new record, if I don't add a value to every table involved with the form. The empty tables when later given data will cause the tables that were given data previously to contain a Null value fortheir foreign key field. This is why there are issues appending new records.

Why would a tables foriegn key get nulled?

Thanks,
KellyPutty
 
Who can say?
Better post the SQL view of the query and then someone may be able to.
 
SELECT Clients.ClientID AS Clients_ClientID, Clients.LastName, Academics.ClientID AS Academics_ClientID, Academics.CurrentlyEnrolled, Tribals.ClientID AS Tribals_ClientID, Tribals.TribalAffiliation, Vocations.ClientID AS Vocations_ClientID, Vocations.Carpenter, Carpenters.ClientID AS Carpenters_ClientID, Carpenters.HasOwnTools FROM ((Clients INNER JOIN Academics ON Clients.ClientID=Academics.ClientID) INNER JOIN (Vocations INNER JOIN Carpenters ON Vocations.ClientID=Carpenters.ClientID) ON Clients.ClientID=Carpenters.ClientID) INNER JOIN Tribals ON Clients.ClientID=Tribals.ClientID;
 
Is by chance ClientID an autonumber ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes, ClientID is autonumber and the foriegn keys (ClientID in all other tables are number, long integer)
 
So, you have to create the Clients record first, retrieve the generated autonumber and then create the records in the other tables.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Wonderful, I thought it might be something like that.

However, I created this form thru the form wizard.

How does one do the above via a form generated by the wizard.

Best,
KellyPutty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top