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

TheSearcher

Registered User.
Local time
Today, 05:17
Joined
Jul 21, 2011
Messages
304
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: 192

TheSearcher

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

Gasman

Enthusiastic Amateur
Local time
Today, 09:17
Joined
Sep 21, 2011
Messages
14,037
Need to set the Row Source Type for the combo.
 

bob fitz

AWF VIP
Local time
Today, 09:17
Joined
May 23, 2011
Messages
4,717
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, 09:17
Joined
Sep 21, 2011
Messages
14,037
Plus I thought the first was sqlI as the lowercasel looks like a numeric 1? :(
 

Users who are viewing this thread

Top Bottom