Searching Through ComboBoxes

K

Kgwill85

Okay, I see one bug... try exchanging the relevant line with:

stdWhere="[ID]='" & cmbPARID & "' OR [BO_Project_Name]= '
" & cmbBO_Project_Name & "'"

I'm confused with this one, where exactly do I put this? Could you
reply with just the line that it's suppose to replace?
 
K

Kgwill85

Okay, I see one bug... try exchanging the relevant line with:
stdWhere="[ID]='" & cmbPARID & "' OR [BO_Project_Name]= '
" & cmbBO_Project_Name & "'"

I'm confused with this one, where exactly do I put this? Could you
reply with just the line that it's suppose to replace?

Well since this isn't working at all, I have went back to using a
macro for this. I got it to find the PARID correctly so far, but it
will not search for the BO_Project_Name.
 
S

Steve Schapel

Kgwill85,

You should always precede a FindRecord action with a GoToControl action.
In this case, the active control on the Project_Inventory form just
happens to be the PARID (presumably because it is the first in the Tab
Order, but even then, I would still explicitly state it.

I still can't understand how you are relating to the Project_Inventory
form from the form that you have the criteria entered. I will assume
that it is a different form, and that it is already open.

So, I would set up the macro like this...

Action: SelectObject
Object Type: Form
Object Name: Project_Inventory

Condition: [PARID] Is Not Null
Action: GoToControl
Control Name: [Forms]![Project_Inventory]![PARID]

Condition: ...
Action: FindRecord
Find What:=[PARID]

Condition: ...
Action: StopMacro

Action: GoToControl
Control Name: [Forms]![Project_Inventory]![BO_Project_Name]

Action: FindRecord
Find What:=[BO_Project_Name]

This is making quite a few assumptions, as you haven't provided much
information.
 
O

OldPro

Okay, I see one bug... try exchanging the relevant line with:
stdWhere="[ID]='" & cmbPARID & "' OR [BO_Project_Name]= '
" & cmbBO_Project_Name & "'"

I'm confused with this one, where exactly do I put this? Could you
reply with just the line that it's suppose to replace?

stdWhere should be strWhere and this line should replace the strWhere
line(once the spelling is corrected). There is only one line that
starts with strWhere=...
 

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