Criteria doesnt open form

L

Lana

Hi all,

I have the MAIN unbound form with unbound combo [Status1] on it.
Its row source is:
SELECT stStatus.ID, stStatus.Status FROM stStatus ORDER BY stStatus.Status;
(shows status, but doesn't show ID Number)

I choose a value in combo and press button to open another form which is
supposed to show list of records meeting the Criteria specified:

stLinkCriteria = "[PrStatus]=" & "'" & Me![Status1].Column(0) & "'"

([PrStatus] is a number field, that's why i chosen for criteria the
Column(0) - which is ID Number)

But something here is wrong, - when i choose a value in combo and press
button to open another form - it gives me only the window saying "action was
cancelled".

Can anybody help please?
Thank you.
Lana

BTW: I have a provision to show all records in opened form if the combo
[Status1] left empty - that case works all right.
 
S

Svetlana

As your StatusID is a number first you don't need the ' '
stLinkCriteria = "[PrStatus]=" & Me![Status1].Column(0)
 

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