handling error messages + last_inserted_id + list_box search

  • Thread starter Thread starter damjanu
  • Start date Start date
D

damjanu

Dear All;

I have 3 issues

1) On some of my tables I have unique indexes, so that
for example no two phone numbers can be the same.
When user enters phone number that already exists, a
scary error comes up with error number telling him
that it is a duplicate. I would like to catch this error
number xxxx and handle it so that I stop execution,
and report a MsbBox..... I hope this is possible.
Does anyone know the mechanisam for this, or
maybe has some sample code, or a usefull link....

2) Is there a last_inserted_id in access, to find out
the value of last inserted row for a autoincrement
field?

3) I have a list box with large number of entries. I would
like to have a way to search it similar to (or exactly
the same) as the one automatically implemented by access
on combo boxes - as I type the search word
it displays the entries in the list that match the letters
typed. I think this is not already done? Does anyone have
somewhere that this can be downloaded, or has anyone tried to
do this already and can maybe share their experiances.

Hopefully the fact that I have 3 questions together doesnt
scare anybody off - it shows that I thought of them.

I am near the end of my project, and it would not be possible
to complete it without this group. Thanks to all that helped
or even read my messages.

Happy New Year

Damjan
 
Answered in another newsgroup.

If you feel you need to post to more than one group (and this is rarely the
case), Multipost instead. That way, others can read the answers given and
avoid duplication of efforts.
 
Ok, thanks for your advice and your excellent help.
Damjan
PS I post to both groups because it increases the chance of someone
seening my post and therefore me getting help.
 
(e-mail address removed) wrote in

PS I post to both groups because it increases the chance of someone
seening my post and therefore me getting help.

Unless you are killfiled!
 
Back
Top