synchronize combo box problem

M

mccoy

i created a sync combo box copying from a sample database

but the problem is i cannot get the right criteria for the second cbo
because the format of the first cbo is like "09-001" the result of the query
on my second combo only reflects as 9-1

ihave used the format function
but cannot get the right result

Private Sub cboSONUMBER_AfterUpdate()
Dim sitemSource As String

sitemSource = "SELECT [MONITORING].[SO], [MONITORING].[PROJECT],
[MONITORING].[REMARKS] " & _
"FROM MONITORING " & _
"WHERE [SO] = " & Format(Forms![CBOFILTER]!
cboSONUMBER, "00-000")
Me.cboitemdesc.RowSource = sitemSource
Me.cboitemdesc.Requery

please help
 
J

Jeanette Cunningham

Answered in your previous post just before this one.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
L

Larry Linson

The questions then would be:

1. What is the value of the first combo box, without formatting it?

2. What type of field is field SO in the table?

In the Immediate Window of Access 2003:

? Format (09001,"00-000")
09-001
? Format ("09-001","00-000")
40-057

obviously, there has been some type coercion strangeness going on in the
second example, but, for sure, it does not return 9-1.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top