
Are there good books on Visual Basic?
My guess is that you created a command button using the
wizard instead of writing the code directly. You must
have created a button with the same name twice and deleted
the actual button in the design view. Deleting buttons in
design view do not delete the code behind them. So,
resulting with two sub procedures in the code. When two
sub procedures have the same name the error you are
talking about with ambigious name will result.
Jeff Adams
Quote:
>-----Original Message-----
>I recently put the finishing touches to a teacher
training database I began
Quote:
>last year. It now works fine...
>....except for one thing: I've noticed that Access (97)
seems to squirt code
Quote:
>in unexpected (to me) places and on one form it's caused
errors!
>The code relating to on-screen buttons appeared, attached
to the form, after
>I'd added some command buttons to trigger a macro group
to open several
>other forms.
>I noticed that the code associated with one particular
button appeared twice
Quote:
>and the error was generated when I tried to add data to a
subform, attached
>to the main form.
>So, in a copy of the database, I then deleted the
offending code and the
Quote:
>form and subform now work properly, without generating
error messages. The
>buttons also still work!
>Foolishly I didn't note down the error message but the
gist was that
>something was 'ambiguous' - presumably the fact that the
code was there
>twice!
>The thing is, I don't understand why it appeared on the
code list for the
>form in the first place, and the Help on screen - well it
doesn't provide
>much help! More intriguing is why it now works having
removed the code.
>Can anyone recommend any good books on Visual Basic?
Though I'm reasonably
Quote:
>proficient with Access, I'm a complete novice with Basic.
I need a book
>which communicates with clarity the basic concepts before
moving on to the
>detail!
>Thanks in advance
>BILL MARTIN
>.