G
Guest
Hi there
I have produced an alpha list which is updated by pressing 26 "A" - "Z"
Alpha buttons, works a treat, but there must be a simpler way than having to
produce 26 snippets of code, any ideas?
Code Example 1
Private Sub A_Click()
'Updates txtAlpha, which inturn updates the Driver Details Query.
Me.txtAlpha = "A"
Me.Refresh
End Sub
Code Example 2
Private Sub txtAlpha_AfterUpdate()
On Error GoTo Err_txtAlpha_AfterUpdate
'Updates the driver details query.
Dim stDocName As String
stDocName = "DriverDetailsQuery"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_txtAlpha_AfterUpdate:
Exit Sub
Err_txtAlpha_AfterUpdate:
MsgBox Err.Description
Resume Exit_txtAlpha_AfterUpdate
End Sub
Cheers Ross
I have produced an alpha list which is updated by pressing 26 "A" - "Z"
Alpha buttons, works a treat, but there must be a simpler way than having to
produce 26 snippets of code, any ideas?
Code Example 1
Private Sub A_Click()
'Updates txtAlpha, which inturn updates the Driver Details Query.
Me.txtAlpha = "A"
Me.Refresh
End Sub
Code Example 2
Private Sub txtAlpha_AfterUpdate()
On Error GoTo Err_txtAlpha_AfterUpdate
'Updates the driver details query.
Dim stDocName As String
stDocName = "DriverDetailsQuery"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_txtAlpha_AfterUpdate:
Exit Sub
Err_txtAlpha_AfterUpdate:
MsgBox Err.Description
Resume Exit_txtAlpha_AfterUpdate
End Sub
Cheers Ross