access, ComboBox and modify data

  • Thread starter Gianluca_Venezia
  • Start date
G

Gianluca_Venezia

Situation:
- ComboBox (Field id hidden + phone number)
- Data not in list in the ComboBox (phone number)
- Event "Not in list"
- Opening Form to insert data

When the insert data form is opened, sometime there is to change the
phonenumber into the form. Returnig to the main form, the system alert
that the inserted text is not in list.

To turn around this problem, insert data form pass to a volatile
variable the new id and the new number, and when it close, I write the
new id into the combobox.value. I have verified that this id is
inserted into the list, but the alert show the message always.

After "Not in list" event, there aren't event before the end of that
event.

ideas?

Bye
Gianluca

and sorry for my english.... I'm Italian...
 
M

Matthew Sullivan

Gianluca:

You probably need to Requery the ComboBox in order to get the new
entries to show in the list.

You might have to temporarily store the value you were trying to
insert; I think you could get at it via the Text property of the
ComboBox.

So, maybe something like:
- store Text property in a variable
- run your code to add item to list
- Requery ComboBox
- write stored variable back to Text property

Whaddya think?

-Matt
 
G

Gianluca_Venezia

Matthew Sullivan said:
Gianluca:

You probably need to Requery the ComboBox in order to get the new
entries to show in the list.

You might have to temporarily store the value you were trying to
insert; I think you could get at it via the Text property of the
ComboBox.

So, maybe something like:
- store Text property in a variable
- run your code to add item to list
- Requery ComboBox
- write stored variable back to Text property




I have found last night this solution. however, Thank you a lot

Gianluca
 

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