Garcimat
Member
- Local time
- Tomorrow, 08:41
- Joined
- Jun 7, 2022
- Messages
- 67
Hi guys
I have a list box on my form with data from a query, in the double click event it would collect the data from the record clicked, send it to another query and then open a form with that specific record. I want to change the format (as an visual alarm) when that record expire, not possible with ListBox so I changed it to a Subform, (Continuous SubForm, fields Unable=yes and Locked=yes)
I have to achieve the same as before, when double clicked it has to open a form(frm_PTF2) with that specific selected record... I have been trying to fix this for the whole day and I am almost going back to the previous design. Below is my code for the List box, thank you in advance.
Private Sub lst_ActivePermits_DblClick(Cancel As Integer)
'On Error GoTo ErrorBin_Err
'gvar_SWONumber and gvar_SWONumber Global Variables
gvar_SWONumber = lst_ActivePermits.Column(0) 'capture value 1 from list box (SWO Number)
gvar_SWONumber = lst_ActivePermits.Column(1) 'capture value 2 from list box (PTF Number)
DoCmd.Close acForm, Me.Name
DoCmd.OpenQuery "qrs_ptfnavig", acViewPreview
DoCmd.OpenForm "frm_PTF2", acNormal
'ErrorBin_Exit:
' Exit Sub
'ErrorBin_Err:
' MsgBox Err.Number & " " & Err.Description
' Resume ErrorBin_Exit
End Sub
I have a list box on my form with data from a query, in the double click event it would collect the data from the record clicked, send it to another query and then open a form with that specific record. I want to change the format (as an visual alarm) when that record expire, not possible with ListBox so I changed it to a Subform, (Continuous SubForm, fields Unable=yes and Locked=yes)
I have to achieve the same as before, when double clicked it has to open a form(frm_PTF2) with that specific selected record... I have been trying to fix this for the whole day and I am almost going back to the previous design. Below is my code for the List box, thank you in advance.
Private Sub lst_ActivePermits_DblClick(Cancel As Integer)
'On Error GoTo ErrorBin_Err
'gvar_SWONumber and gvar_SWONumber Global Variables
gvar_SWONumber = lst_ActivePermits.Column(0) 'capture value 1 from list box (SWO Number)
gvar_SWONumber = lst_ActivePermits.Column(1) 'capture value 2 from list box (PTF Number)
DoCmd.Close acForm, Me.Name
DoCmd.OpenQuery "qrs_ptfnavig", acViewPreview
DoCmd.OpenForm "frm_PTF2", acNormal
'ErrorBin_Exit:
' Exit Sub
'ErrorBin_Err:
' MsgBox Err.Number & " " & Err.Description
' Resume ErrorBin_Exit
End Sub