[AccessD] Help with Combo Box

Tesiny, Ed EdTesiny at oasas.state.ny.us
Tue May 27 14:28:08 CDT 2003


I have two combo boxes and I'm trying to limit the contents of the
second combo box based on the selection made in the first box.  I'm
obviously doing something wrong because the second combo box saving the
value of the first box in the table.

For the Row Source of the 2nd  combo box I have:

 

SELECT ComplaintGeneralCode, ComplaintSpecificDesc

FROM tblComplaintSpecific

WHERE ComplaintGeneralCode =
Forms!SF_Complaints_New!cboComplaintGeneral;

 

For the 1st combo box I have:

 

Private Sub cboComplaintGeneral_AfterUpdate()

Me!cboComplaintSpecific.Requery

End Sub

 

Table tblComplaintGeneral has two fields: ComplaintGeneralCode
(autonumber), ComplaintGeneralDesc (text)

Table tblComplaintSpecific has 3 fields:  ComplaintSpecificCode
(autonumber), ComplaintGeneralCode (long integer), ComplaintSpecificDesc
(text)

 

In addition, when I try to close the form I get a parameter window
asking for a value for Forms!SF_Complaints_New!cboComplaintGeneral

 

Any help is greatly appreciated.

 

Ed

 
Edward P. Tesiny
New York State OASAS
Evaluation and Program Monitoring
1450 Western Ave.
Albany, New York  12203-3526
Phone:  (518) 485-7189
Fax:  (518) 485-5769
EdTesiny at oasas.state.ny.us
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030527/7f36d8b5/attachment.html>


More information about the AccessD mailing list