I have a combo box called "Recipient" who's row source is a table called
"Main" with three columns. The three columns are "Name", "Floor", "Location".
Following the combo box are two fields called "Floor" and "Location". The
after update event of the combo box runs the following lines to update the
next two fields.
[Floor] = Recipient.Column(2)
[Location] = Recipient.Column(3)
The combo box is not limited to the values in its rowsource table. What I
want is that if the value entered in the combo box is not in its rowsource it
should update the next two fields as follows.
[Floor] = "1"
[Location] = "?"
I tried the following code and it gives me the error "You canceled the
previous operation".
if DCount("*", "Main", "[Name]=" & me.Recipient)< 1 then
[Floor]="1"
[Location]="?"
else
[Floor] = Recipient.Column(2)
[Location] = Recipient.Column(3)
end if.
--
Message posted via http://www.accessmonster.com