Create Error Statement?

  • Thread starter Thread starter jody
  • Start date Start date
J

jody

I currently have a database where I have implemented a
button to allow the user to duplicate a record and
increment the date by one day. The table has multi-keyed
fields: repID, date, time, activity. If the user tries
to duplicate a record that already exists in the table,
nothing happens. (I would like to add an error statement
to let the user know that a record already exists.)
Otherwise, the record gets added and shows up on the
form. Since I'm new to VB, I would appreciate any
suggestions or help to create this error message.

Thanks in advance.
 
Hi Jody,

Try using the MsgBox function (you can get help in the
visual basic help section). But, one note regarding
this, if you aren't interested in getting the result of
the button that the user clicks, you can just use the
syntax:

MsgBox "Type your message here"

This will display the message with an OK box.

Otherwise, you can use the syntax that is described in
the help section to set various options such as what
buttons are displayed, and then have the button result
assigned to a variable.

-Ted Allen
 

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

Back
Top