B
Bmusgrove
Button Command39 on main form, when clicked opens the SWLicensesForm. Button
WinXP_Click() on the SWLicensesform, when clicked adds a new record and
fills in some fields for me. My problem is in the POTEMP and NuaNumTmp
variables being passed from the main form to th SwLicensesform.. These are
no longer being passed from the main form to the SWLicensesform, and I can
not fiure out why. I have a backup of the database that is about 8 days old
that works fine. The only thing I have done between the backup and the
variables not working is to compact the database. There are no error
messages, and I am at a loss to determine why the variables are being
destroyed or how to determine why.
On the main form
Private Sub Command39_Click()
On Error GoTo Err_Command39_Click
Dim stDocName As String
Dim stLinkCriteria As String
POTEMP = Me.PO.Value
NuaNumTmp = Me.NUANUm.Value
MsgBox POTEMP
MsgBox NuaNumTmp
stDocName = "SWLicensesform"
DoCmd.OpenForm stDocName, , , , acFormAdd, , stLinkCriteria
Exit_Command39_Click:
Exit Sub
Err_Command39_Click:
MsgBox Err.Description
Resume Exit_Command39_Click
End Sub
On the SwLicenses Form is a button to add a default
Private Sub WinXP_Click()
On Error GoTo Err_WinXP_Click
DoCmd.GoToRecord , , acNewRec
Me.software.Value = "Windows XP"
Me.Publisher.Value = "Microsoft"
Me.VersionTxt.Value = "Professsional"
Me.Quantity.Value = "1"
Me.LicType.Value = "OEM"
Me.Status.Value = "active"
Me.NUANUm.Value = NuaNumTmp
Me.PO.Value = POTEMP
Me.LicenseNumber.SetFocus
MsgBox POTEMP
exit_WinXP_Click:
Exit Sub
Err_WinXP_Click:
MsgBox Err.Description
Resume exit_WinXP_Click
End Sub
WinXP_Click() on the SWLicensesform, when clicked adds a new record and
fills in some fields for me. My problem is in the POTEMP and NuaNumTmp
variables being passed from the main form to th SwLicensesform.. These are
no longer being passed from the main form to the SWLicensesform, and I can
not fiure out why. I have a backup of the database that is about 8 days old
that works fine. The only thing I have done between the backup and the
variables not working is to compact the database. There are no error
messages, and I am at a loss to determine why the variables are being
destroyed or how to determine why.
On the main form
Private Sub Command39_Click()
On Error GoTo Err_Command39_Click
Dim stDocName As String
Dim stLinkCriteria As String
POTEMP = Me.PO.Value
NuaNumTmp = Me.NUANUm.Value
MsgBox POTEMP
MsgBox NuaNumTmp
stDocName = "SWLicensesform"
DoCmd.OpenForm stDocName, , , , acFormAdd, , stLinkCriteria
Exit_Command39_Click:
Exit Sub
Err_Command39_Click:
MsgBox Err.Description
Resume Exit_Command39_Click
End Sub
On the SwLicenses Form is a button to add a default
Private Sub WinXP_Click()
On Error GoTo Err_WinXP_Click
DoCmd.GoToRecord , , acNewRec
Me.software.Value = "Windows XP"
Me.Publisher.Value = "Microsoft"
Me.VersionTxt.Value = "Professsional"
Me.Quantity.Value = "1"
Me.LicType.Value = "OEM"
Me.Status.Value = "active"
Me.NUANUm.Value = NuaNumTmp
Me.PO.Value = POTEMP
Me.LicenseNumber.SetFocus
MsgBox POTEMP
exit_WinXP_Click:
Exit Sub
Err_WinXP_Click:
MsgBox Err.Description
Resume exit_WinXP_Click
End Sub