Help with Synchronized Combo Boxes

SomeDude

Registered User.
Local time
Today, 09:34
Joined
Oct 4, 2013
Messages
13
I'm developing an Invoicing database (which I've attached a sanitized copy) where I'd like to have an invoice number combo box show only invoices relevant to the client previously selected in the client name combo box.

I downloaded an example from Microsoft's templates website (which I've also attached), and I thought this would be a simple task.

I'm not sure what I'm doing wrong, but I figure it's something simple.

I'd prefer to use vba; I really don't want to use macros.

Any chance somebody could look at my code versus the code in the Microsoft template and tell me what I'm missing?
 

Attachments

Can't test as I only have 2007 on this machine, but because your field is text it needs delimiters:

Code:
    Me.cboInvoices.RowSource = "SELECT [tbl_Invoices].[InvoiceNumber] FROM" & _
                                " [tbl_Invoices] WHERE [tbl_Invoices].[ClientName] = [COLOR="Red"]'[/COLOR]" & Me.cboClients & _
                                "[COLOR="Red"]'[/COLOR] ORDER BY [tbl_Invoices].[InvoiceNumber]"
 
That worked! Thanks! :)
 

Users who are viewing this thread

Back
Top Bottom