Erratic operation with find-record combo.

F

Frank Martin

I have Access2003


I have a main form called "qrySuppOrders" with a field
"PurchaseID".

I have a subform on this main form which incluses the field
"PurchaseID".

I have synchronizes these two forms via "PurchaseID".

But now I want a combo (Combo48) on the main form to search
for & select past purchase order forms. To do this I use
the combo wizard "Find a record which matches the one in the
combo" option.

This works, but not always and sometimes partially (I have
to press F9 & F5 a lot.)

Is there any other way to synchronize Combo48 with the
"PurchaseID" fields on the subform?

PS: When the Wizard constructs Combo48, it is given the
name "PurchaseID1" even though there is no such field in the
whole database.

Please help, Frank
 
S

strive4peace

Hi Frank,

"PS: When the Wizard constructs Combo48, it is given the
name "PurchaseID1" even though there is no such field in the
whole database."

this does not make sense ... if the control name is PurchaseID1, then
why are you calling it Combo48?

Also, if it is a combo to FIND records, there should be no
ControlSource. After the lookup is done, the combo should be set to
Null -- since it is not bound to a field, its value will not change as
you move from record to record.

To keep the combo up to date, put this on the form AfterUpdate event:

'~~~~~~~~~~~~~~
me.combo_controlname.requery
'~~~~~~~~~~~~~~

WHERE
combo_controlname is the Name property of the combo

if there are columns in the combo that come from the table that the
subform is based on, then, on the subform AfterUpdate event:

'~~~~~~~~~~~~~~
me.parent.combo_controlname.requery
'~~~~~~~~~~~~~~


Warm Regards,
Crystal
remote programming and training

Video Tutorials on YouTube!
http://www.youtube.com/user/LearnAccessByCrystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
F

Frank Martin

Thanks, this fixed it.
Regards, Frank



strive4peace said:
Hi Frank,

"PS: When the Wizard constructs Combo48, it is given the
name "PurchaseID1" even though there is no such field in
the
whole database."

this does not make sense ... if the control name is
PurchaseID1, then why are you calling it Combo48?

Also, if it is a combo to FIND records, there should be no
ControlSource. After the lookup is done, the combo should
be set to Null -- since it is not bound to a field, its
value will not change as you move from record to record.

To keep the combo up to date, put this on the form
AfterUpdate event:

'~~~~~~~~~~~~~~
me.combo_controlname.requery
'~~~~~~~~~~~~~~

WHERE
combo_controlname is the Name property of the combo

if there are columns in the combo that come from the table
that the subform is based on, then, on the subform
AfterUpdate event:

'~~~~~~~~~~~~~~
me.parent.combo_controlname.requery
'~~~~~~~~~~~~~~


Warm Regards,
Crystal
remote programming and training

Video Tutorials on YouTube!
http://www.youtube.com/user/LearnAccessByCrystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 

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