dinkytrouble
Technical User
Hi
I have a problem where i have split my database to FEBE. I can query my tables and see the information i want, apart from my coding to transfer my data to a new table. would some one please have a look at it and tell me where i am going wrong and possibly help me to change the code so it would work. My VBA skills is very limited as you can see.
i have put in a note to say where it halts as i think the problem lies in the fact the tables are linked and i need to tell it that. many thanks
mike
Private Sub Command35_Click()
Dim LResponse As Integer
LResponse = MsgBox("Do You Want To Release This Lot To Blister Loading ?", vbYesNo, "Continue")
If LResponse = vbYes Then
MSG = "Lot Released !!" ' and take appropriate
Dim temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, TEMP9, TEMP10 As String
temp2 = [CAVITY]
temp3 = [pldcavity]
temp4 = [label Power]
temp5 = [MAIN pld]
temp7 = [passes]
temp8 = [oven]
TEMP9 = [fit]
halts here>
Dim MyDB As Database, MyTable As Recordset
Set MyDB = DBEngine.Workspaces(0).Databases(0)
Set MyTable = MyDB.OpenRecordset("BLISTER LOADING", DB_OPEN_TABLE)
On Error Resume Next ' Set up error handler.
MyTable.AddNew
MyTable("CAVITY") = temp2
MyTable("PLDCAVITY") = temp3
MyTable("target POWER") = temp4
MyTable("main pld") = temp5
MyTable("starts") = temp7
MyTable("oven") = temp8
MyTable("FIT") = TEMP9
MyTable.Update
MsgBox "released"
DoCmd.Close
Else
MsgBox "This Lot Has Not Been Released To Blister Loading !!", , "Status Report.."
End If
End Sub
I have a problem where i have split my database to FEBE. I can query my tables and see the information i want, apart from my coding to transfer my data to a new table. would some one please have a look at it and tell me where i am going wrong and possibly help me to change the code so it would work. My VBA skills is very limited as you can see.
i have put in a note to say where it halts as i think the problem lies in the fact the tables are linked and i need to tell it that. many thanks
mike
Private Sub Command35_Click()
Dim LResponse As Integer
LResponse = MsgBox("Do You Want To Release This Lot To Blister Loading ?", vbYesNo, "Continue")
If LResponse = vbYes Then
MSG = "Lot Released !!" ' and take appropriate
Dim temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, TEMP9, TEMP10 As String
temp2 = [CAVITY]
temp3 = [pldcavity]
temp4 = [label Power]
temp5 = [MAIN pld]
temp7 = [passes]
temp8 = [oven]
TEMP9 = [fit]
halts here>
Dim MyDB As Database, MyTable As Recordset
Set MyDB = DBEngine.Workspaces(0).Databases(0)
Set MyTable = MyDB.OpenRecordset("BLISTER LOADING", DB_OPEN_TABLE)
On Error Resume Next ' Set up error handler.
MyTable.AddNew
MyTable("CAVITY") = temp2
MyTable("PLDCAVITY") = temp3
MyTable("target POWER") = temp4
MyTable("main pld") = temp5
MyTable("starts") = temp7
MyTable("oven") = temp8
MyTable("FIT") = TEMP9
MyTable.Update
MsgBox "released"
DoCmd.Close
Else
MsgBox "This Lot Has Not Been Released To Blister Loading !!", , "Status Report.."
End If
End Sub