Update table from form (1 Viewer)

Jonny45wakey

Member
Local time
Today, 07:29
Joined
May 4, 2020
Messages
40
Hi I'm hoping someone can assist me please?

I have a table called tblRouteCards which contains the following fields:-

Job_Number
Order_Number

I use a form called frmRoutings to populate the table and have a cmd button to open a form called frmBILLOFMATERIALS which uses the following VBA to open the form with matching Job_Numbers


Private Sub Command203_Click()
If Me.Dirty Then

Me.Dirty = False

End If

DoCmd.OpenForm "frmBILLOFMATERIALS", , , "[Job_Number]='" & Me![Job_Number] & "'"

'DoCmd.Close acForm, "frmBOM1"
End Sub

This works fine upto this point and the form frmBILLOFMATERIALS opens displaying the above data.

What i would like to do is on the form frmBILLOFMATERIALS is have another CMD button to insert the values from Job_Number & Order_Number and a textbox called PtNo1 into tblBOM

Ive tried the INSERT INTO SQL but without success

Any help appreciated

Thanks

jonny
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:29
Joined
May 7, 2009
Messages
19,245
can you create a Subform for your bill of material and add it to your tblRouteCards form?

actually on what i am seeing, you will be needing at least 3 tables.

JobMaster (jobID, job_number, order_number, order_date)
JobMaterial(jobID, materialID, quantity)
Material(materialID, description, etc).
 

Users who are viewing this thread

Top Bottom