D
DawnTreader
Hello All
does anyone see anything wrong with this code on a list box that opens a
popup form to a specific record:
Private Sub lstWarnings_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "pfrmWarnings"
stLinkCriteria = "[WarningID]=" & Me.lstWarnings.Column(0)
MsgBox stLinkCriteria
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , "Opened"
End Sub
and here is the code that happens as the form loads:
Private Sub Form_Load()
MsgBox Me.OpenArgs
Select Case Me.OpenArgs
Case "New"
Me.DataEntry = True
Me.Cycle = 0
Me.AllowAdditions = True
Me.txtSerialNumber.Requery
Me.cmdDeleteWarning.Visible = False
Me.cmdWarningFinished.Visible = False
Case "Opened"
Me.DataEntry = False
Me.Cycle = 1
Me.AllowAdditions = False
Me.txtSerialNumber.Requery
Me.cmdDeleteWarning.Visible = True
Me.cmdWarningFinished.Visible = True
Case Else
End Select
End Sub
does any one see something that i dont that would cause the form to not open
on the record specified in the stLinkCriteria variable? i have been fighting
this for days...
does anyone see anything wrong with this code on a list box that opens a
popup form to a specific record:
Private Sub lstWarnings_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "pfrmWarnings"
stLinkCriteria = "[WarningID]=" & Me.lstWarnings.Column(0)
MsgBox stLinkCriteria
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , "Opened"
End Sub
and here is the code that happens as the form loads:
Private Sub Form_Load()
MsgBox Me.OpenArgs
Select Case Me.OpenArgs
Case "New"
Me.DataEntry = True
Me.Cycle = 0
Me.AllowAdditions = True
Me.txtSerialNumber.Requery
Me.cmdDeleteWarning.Visible = False
Me.cmdWarningFinished.Visible = False
Case "Opened"
Me.DataEntry = False
Me.Cycle = 1
Me.AllowAdditions = False
Me.txtSerialNumber.Requery
Me.cmdDeleteWarning.Visible = True
Me.cmdWarningFinished.Visible = True
Case Else
End Select
End Sub
does any one see something that i dont that would cause the form to not open
on the record specified in the stLinkCriteria variable? i have been fighting
this for days...