E
Elaine
I have a field that is linked via a list box to a table, I have a button
that should open another form when the appropriate name has been selected,
there is something missing out of my code, as I do a value list and it works
but as soon as i do a lookup to a table it doesn look at it, totally
baffled...
Private Sub List26sagain_Click()
On Error GoTo Err_open_Click
Dim stDocName As String
Dim stLinkCriteria As String
'This code is for the List26 and the forms for April 2008 to March 2009
'1 - Doctors
If (List26) = "AHMAD A DR (GENERAL MEDICINE/ DIABETES)" Then
stDocName = "Dr Ahmad A (General Medicine/Diabetes)"
DoCmd.OpenForm stDocName, , , stLinkCriteria
ElseIf (List26) = "ALAWATTEGAMA A DR [GENITOURINARY MEDICINE]" Then
stDocName = "Dr Alawattegama A (Genitourinary Medicine)"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Please help
Elaine
that should open another form when the appropriate name has been selected,
there is something missing out of my code, as I do a value list and it works
but as soon as i do a lookup to a table it doesn look at it, totally
baffled...
Private Sub List26sagain_Click()
On Error GoTo Err_open_Click
Dim stDocName As String
Dim stLinkCriteria As String
'This code is for the List26 and the forms for April 2008 to March 2009
'1 - Doctors
If (List26) = "AHMAD A DR (GENERAL MEDICINE/ DIABETES)" Then
stDocName = "Dr Ahmad A (General Medicine/Diabetes)"
DoCmd.OpenForm stDocName, , , stLinkCriteria
ElseIf (List26) = "ALAWATTEGAMA A DR [GENITOURINARY MEDICINE]" Then
stDocName = "Dr Alawattegama A (Genitourinary Medicine)"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Please help
Elaine