G
gvaughn
I am having a problem with my code, all I am trying to do is take the value
enter in TBValueToEnter and place it in the TruckNumber of the database
dbo_TruckNumber. I have tried it this way:
Private Sub Command16_Click()
Tables![dbo_TruckNumber]![TruckNumber] = Me.TBValueToEnter
'Dim stDocName As String
'stDocName = "TruckNumber"
'DoCmd.OpenReport stDocName, acViewPreview
'DoCmd.PrintOut , , , , 1
'DoCmd.Close acReport, stDocName
and this way:
Dim stDocName As String
stDocName = "TruckNumber"
DoCmd.OpenReport stDocName, acViewPreview, ,
"[dbo_TruckNumber]![TruckNumber] =" & Me.TBValueToEnter
'DoCmd.PrintOut , , , , 1
'DoCmd.Close acReport, stDocName
'DoCmd.Close
the the second one my report opens, but the TBValueToEnter has not been put
into the TruckNumber field, any help would be nice this is driving me crazy.
Thank you.
enter in TBValueToEnter and place it in the TruckNumber of the database
dbo_TruckNumber. I have tried it this way:
Private Sub Command16_Click()
Tables![dbo_TruckNumber]![TruckNumber] = Me.TBValueToEnter
'Dim stDocName As String
'stDocName = "TruckNumber"
'DoCmd.OpenReport stDocName, acViewPreview
'DoCmd.PrintOut , , , , 1
'DoCmd.Close acReport, stDocName
and this way:
Dim stDocName As String
stDocName = "TruckNumber"
DoCmd.OpenReport stDocName, acViewPreview, ,
"[dbo_TruckNumber]![TruckNumber] =" & Me.TBValueToEnter
'DoCmd.PrintOut , , , , 1
'DoCmd.Close acReport, stDocName
'DoCmd.Close
the the second one my report opens, but the TBValueToEnter has not been put
into the TruckNumber field, any help would be nice this is driving me crazy.
Thank you.