Can't Add New Records In Form (1 Viewer)

ericgon34

New member
Local time
Yesterday, 22:05
Joined
Feb 5, 2015
Messages
3
Hello,

This is my first post, and I have a particular predicament, which I hope I can explain easily enough.

Information: I am building a Form based on 3 Tables. Each with primary keys, although two tables do not relate to one another, and I am using one table to be the link within both of them, which has both of the primary key fields within it.

Issue: The issue is that I am building this form and in the control source I am building this query to pull the information for the form, which I was hoping will allow me to add new records (Not Working :banghead:). I am also attempting to accomplish that when I integrate a field from one of these tables into the form (the table that does not relate to it at all, other than through the linked table) that it will show the fields relating primary key in a transparent text box. This field I am integrating will be disabled for editing (like transparent), but will show up when the corresponding field (primary key) populates with the appropriate number.

The Fields in the pictures on the form that are dimmed are the fields that will not be enabled, but once I do this it does not allow me to enter New Records :banghead:.

Here is what I currently have in SQL, and I have also attached pictures.

I have been at this for hours!!! Not really that good with VBA either so it just makes it that much more difficult.

Any help would be greatly appreciated. :D

Here is the SQL:

SELECT TblSupplierTests.*, TblCreamReceiptsScaleWeights.LoadID, TblLOLCreamTests.BFTestForSettle, TblLOLCreamTests.SNFTestForSettle, TblCreamReceiptsScaleWeights.RecievedDate, TblCreamReceiptsScaleWeights.SupplierLBS AS SupplierLBS_TblCreamReceiptsScaleWeights
FROM TblLOLCreamTests RIGHT JOIN (TblSupplierTests LEFT JOIN TblCreamReceiptsScaleWeights ON TblSupplierTests.BOLID = TblCreamReceiptsScaleWeights.BillOfLadingID) ON TblLOLCreamTests.SO = TblCreamReceiptsScaleWeights.LoadID;
 

Attachments

  • DesignViewRelations.PNG
    DesignViewRelations.PNG
    34.8 KB · Views: 121
  • DesignviewtformPNG.PNG
    DesignviewtformPNG.PNG
    12.5 KB · Views: 129

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:05
Joined
Jan 20, 2009
Messages
12,849
Your form cannot edit or accept new records because the query is not updateable.

You need to use a subform structure.
 

ericgon34

New member
Local time
Yesterday, 22:05
Joined
Feb 5, 2015
Messages
3
Galaxiom,

That's is exactly what I am trying to avoid.

Any ideas on a way around it?

Thanks for the reply.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:05
Joined
Jan 20, 2009
Messages
12,849
No other way around it.

However Subforms can be made to look like they are part of the main form by using Continuous Forms and turning off the border.

Also note that the linking is done on the Recordset fields of the forms and there is no need to show them on the form.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:05
Joined
Sep 12, 2006
Messages
15,614
how can you link tables that are not related?
 

Users who are viewing this thread

Top Bottom