xmeb
Technical User
- Jun 5, 2013
- 89
Hi:
I have been using the following code on a form for months and it worked fine.
Today I added the following code to the same form.
It to works fine but has created a problem with my save command button.
I did some research and apparently because I added "Option Explicit Public Message As String" to my code for the scrolling text box the save command button now needs a "Dim" statement of some sort which I do not know how to add.
Thanks,
xmeb
I have been using the following code on a form for months and it worked fine.
Code:
Private Sub DataEntryFormMasterSaveCommandButton_Click()
myReply = MsgBox("Are you sure you want to save this record? You cannot edit data after you save it.", vbYesNo)
If myReply = vbYes Then
RunCommand acCmdSaveRecord
Me.Requery
End If
End Sub
Today I added the following code to the same form.
Code:
Private Sub Form_Open(Cancel As Integer)
Message = "..."
End Sub
Code:
Private Sub Form_Timer()
TextBox = Message
'Get first character
Dim FChar As String
FChar = Left(Message, 1)
'Remove first character
Message = Mid$(Message, 2, Len(Message) - 1)
'Put 1st character at the end of the message.
Message = Message + FChar
End Sub
It to works fine but has created a problem with my save command button.
I did some research and apparently because I added "Option Explicit Public Message As String" to my code for the scrolling text box the save command button now needs a "Dim" statement of some sort which I do not know how to add.
Thanks,
xmeb