P
Paul (TRX)
This is going back to what I've asked before. Upon somebody's suggestion, I
searched "cascading combo boxes" or something along those lines. I found a
site with code on how to do what I wanted and entered the code correctly, but
all I get is an error message. Here is the code:
Private Sub Lname_AfterUpdate()
On Error Resume Next
Fname.RowSource = "Select tblRoster.Fname " & _
"FROM tblRoster " & _
"WHERE tblRoster.Lname = '" & Lname.Value & "' " & _
"ORDER BY tblRoster.Fname;"
End Sub
I enter this in the "After Update" event in the properties of the Lname
(last name) combo box so that, after the user selects a last name, it should
query the database and pull ONLY the first names that match that last name.
Instead of doing that, it keeps giving me the following error message:
Miscrosoft Office Access can't find the macro 'Fname
The macro (or its macro group) doesn't exist, or the macro is new but hasn't
been saved.
Note that when you enter the macrogroupname.macroname syntax in an argument,
you must specify the name the macro's macro group was last saved under.
I can't understand what I am doing wrong. Can anybody help?
--
Have a nice day!
~Paul
~~~~~~
| |
|c--OD
| _)
| |
|-. |
/ `-# /A
/ /_|..`#.J/
||LJ `m''''''''
ptaylor
searched "cascading combo boxes" or something along those lines. I found a
site with code on how to do what I wanted and entered the code correctly, but
all I get is an error message. Here is the code:
Private Sub Lname_AfterUpdate()
On Error Resume Next
Fname.RowSource = "Select tblRoster.Fname " & _
"FROM tblRoster " & _
"WHERE tblRoster.Lname = '" & Lname.Value & "' " & _
"ORDER BY tblRoster.Fname;"
End Sub
I enter this in the "After Update" event in the properties of the Lname
(last name) combo box so that, after the user selects a last name, it should
query the database and pull ONLY the first names that match that last name.
Instead of doing that, it keeps giving me the following error message:
Miscrosoft Office Access can't find the macro 'Fname
The macro (or its macro group) doesn't exist, or the macro is new but hasn't
been saved.
Note that when you enter the macrogroupname.macroname syntax in an argument,
you must specify the name the macro's macro group was last saved under.
I can't understand what I am doing wrong. Can anybody help?
--
Have a nice day!
~Paul
~~~~~~
| |
|c--OD
| _)
| |
|-. |
/ `-# /A
/ /_|..`#.J/
||LJ `m''''''''
ptaylor