Combo Box Error

  • Thread starter kknowles via AccessMonster.com
  • Start date
K

kknowles via AccessMonster.com

I have a form which has a control box on it. I have a query as the
recordsource for this form, which has a number of different fields in it -
one of which is called "PMRS#". I want to be able to use my combo box to jump
to a specific PMRS#, however i keep getting the error message "there is no
field named "PMRS#" in the current record".

In my combo box, my row source is a query which contains two fields: "PMRS#",
and "Description" which is a title for the PMRS#.

In the event tab of my combo box I am using a macro (named "findrec_PMRS") as
an after update event.

The findrec_PMRS macro contains two actions: gotocontrol (where my control
name is [PMRS#]) and findrecord (which finds the value of what was selected
in the combo box).

when i get the error message "there is no field named "PMRS#" in the current
record" , i click OK, and get an "action failed" box:
macro name: findrec_PMRS
condition: true
action name: gotocontrol
arguments: [PMRS#]

I have been stuck on this error for quite a while now and would appreciate
any advice.
Thanks,
- Kris
 
G

Guest

I would suggest changing the name of your combobox to cboPMRS, anything other
than the name of a field. Change your macro to use the combobox as the find
criteria.

I general, it's best to name your form and report controls with a standard
prefix to help your code differentiate them from table fields. I use txt for
textboxes, cbo for comboboxes, lst for listboxes, lbl for labels, etc.

Also, I would avoid using special characters (like "#") in field or control
names.

Barry
 
G

Guest

I would suggest changing the name of your combobox to cboPMRS, anything other
than the name of a field. Change your macro to use the combobox as the find
criteria.

I general, it's best to name your form and report controls with a standard
prefix to help your code differentiate them from table fields. I use txt for
textboxes, cbo for comboboxes, lst for listboxes, lbl for labels, etc.

Also, I would avoid using special characters (like "#") in field or control
names.

Barry
 
K

kknowles via AccessMonster.com

thanks barry, it works! i was using the table field name rather than the name
of the box.

Barry said:
I would suggest changing the name of your combobox to cboPMRS, anything other
than the name of a field. Change your macro to use the combobox as the find
criteria.

I general, it's best to name your form and report controls with a standard
prefix to help your code differentiate them from table fields. I use txt for
textboxes, cbo for comboboxes, lst for listboxes, lbl for labels, etc.

Also, I would avoid using special characters (like "#") in field or control
names.

Barry
I have a form which has a control box on it. I have a query as the
recordsource for this form, which has a number of different fields in it -
[quoted text clipped - 23 lines]
Thanks,
- Kris
 

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