Requery control?

M

Mike J

I have a combobox wit an event that adds a record if
the 'id' doesn't exist. I try to requery the control
(combobox) but I get an erroe 2118 saying I must save the
field befor the requery. my statement is:
IDCtl.Requery where IDCtl is set to the control.
 
J

Jonathan Parminter

-----Original Message-----
I have a combobox wit an event that adds a record if
the 'id' doesn't exist. I try to requery the control
(combobox) but I get an erroe 2118 saying I must save the
field befor the requery. my statement is:
IDCtl.Requery where IDCtl is set to the control.
.
Hi Mike,

are you using the NotInList() event? If not, with the
cursor in this property of the combobox, click F1 to view
online help for ideas.

Luck
Jonathan
 
M

Mike J

-----Original Message-----

Hi Mike,

are you using the NotInList() event? If not, with the
cursor in this property of the combobox, click F1 to view
online help for ideas.

Luck
Jonathan
.
Hey
I am using the Notinlist() event. The record get's added
but I cannot get the requery of the combobox to go w/o
getting the msg. I'm not sure what they want?
 
J

Jonathan Parminter

Hi Mike,

usually the line...

Response = acDataErrAdded

.... is included after an insert of new data to instruct
Access that the combobox is to be requeried as the item
has been successfully added to the rowsource. The line...

Response = acDataErrContinue

.... is included after a prompt to confirm the intention of
the user for the new data to be added and the user has
responded 'no'. This instructs Access that the item has
not been added to the rowsource and therefore to display
system message.

If these lines are missing from your code insert them.
However, if these lines are present, please post your
code - if extensive, just focus on relevant code.

Luck
Jonathan
 

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