Assigning a Row Source to a combo box using VBA (1 Viewer)

TheSearcher

Registered User.
Local time
Today, 18:50
Joined
Jul 21, 2011
Messages
220
See attached db.
Open frm_Authorizations. Choose Mel Gibson as the client in the first combo box. The AfterUpdate event contains code that should populate cmb_Payers.
Can anyone see why cmb_Payers is not populating? I've done this a thousand times with list boxes but I can't figure out why this isn't working with a combo box.
Thanks in advance!
 

Attachments

  • Tracking - Copy.accdb
    632 KB · Views: 135

TheSearcher

Registered User.
Local time
Today, 18:50
Joined
Jul 21, 2011
Messages
220
Forget about this. I didn't have the rowsource type set. That was the problem.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:50
Joined
Sep 21, 2011
Messages
10,561
Need to set the Row Source Type for the combo.
 

bob fitz

AWF VIP
Local time
Today, 23:50
Joined
May 23, 2011
Messages
4,444
Forget about this. I didn't have the rowsource type set. That was the problem.
Can I just mention that in your variable declaration:

Dim sql1, sql2 As String
Dim db As Database
Dim rs As Recordset

sql1 will be a variant, only sql2 will be a string.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:50
Joined
Sep 21, 2011
Messages
10,561
Plus I thought the first was sqlI as the lowercasel looks like a numeric 1? :(
 

Users who are viewing this thread

Top Bottom