Have a database that when opened, has a message box that appears and when this box is closed via a Close button that I have named "OK", the main form opens. I have a Tip table that I type in the message which then appears in the messaage box form. It works perfectly providing I use a Next Message/Previous Message Button to control which of the many numbered messages on my table I wish to use.
What I want is to make sure my users have no control over what message is shown. I would still like to maintain all messages on the table by number and only have the Close (OK) button on the form. While trying to do this with the present code and if I only have 1 message on the table (#1) it will show that message. If I add a 2nd message to the table (#2) without erasing the 1st, it still only shows the first. This way I have a record of everything I have sent messages on. Below is the exisiting code used for my message box with hopes you can tell me what I need to change to make this happen:
Private Sub Form_Load()
On Error GoTo Err_Form_Load
Dim intTip As Integer
Dim intCount As Integer
Randomize
intCount = DCount("*", "tblTip")
intTip = Int(intCount * Rnd)
DoCmd.GoToRecord , , A_GOTO, intTip
Exit_Form_Load:
Exit Sub
Err_Form_Load:
Resume Exit_Form_Load
End Sub
What I want is to make sure my users have no control over what message is shown. I would still like to maintain all messages on the table by number and only have the Close (OK) button on the form. While trying to do this with the present code and if I only have 1 message on the table (#1) it will show that message. If I add a 2nd message to the table (#2) without erasing the 1st, it still only shows the first. This way I have a record of everything I have sent messages on. Below is the exisiting code used for my message box with hopes you can tell me what I need to change to make this happen:
Private Sub Form_Load()
On Error GoTo Err_Form_Load
Dim intTip As Integer
Dim intCount As Integer
Randomize
intCount = DCount("*", "tblTip")
intTip = Int(intCount * Rnd)
DoCmd.GoToRecord , , A_GOTO, intTip
Exit_Form_Load:
Exit Sub
Err_Form_Load:
Resume Exit_Form_Load
End Sub