yronium Level: Moderator

 Registered: 14-04-2002 Posts: 907
|
Re: access recordset
Hello. The "Not defined variable" error means that you didn't declare a variable by the Dim instruction, or either you haven't got an object by that specified name. Or rather, you did it, but there's any mistake in the names.
Now, in your OpenRecordset instruction you have two variables: the rs variable and the cmbMonth.Text variable. So you should check these two declarations, answering to the following two questions:
- did you declare a variable by the name "rs", using the instruction "Dim rs As Database" (or "... As DAO.Database", or "... As ADODB.Recordset", or "... As Variant", or else) before trying to open it?
- did you put a control by the name of "cmbMonth" (have a check on control name spelling), owning a "Text" property (say: are you also sure that the control type is ComboBox?) to be read?
Have a check on these points, and let us know.
Hope it helps
____________________________
Real Programmer can count up to 1024 on his fingers
|