In a form, I use two buttons to serve several circustances:
1. Button1.caption="New record" Button2.Caption="Edit record"
After click Button1, data entry appears. Button captions change into:
2. Button1.Caption="Save Record" Button2.Caption="Cancel"
If I select Button2 in first occassion to edit the current record, Button captions change into:
3. Button1.Caption="Save Changes" Button2.Caption="Undo changes"
In this way, every button has 3 functionalities to execute. To choose the right function, I judge by button captions.
--------------------------------------------------
Expand|Select|Wrap|Line Numbers
- Private Sub Button1_Click()
- Select Case Me.Button1.Caption
- Case "New Record"
- ....
- Case "Save Record"
- ....
- Case "Save Changes"
- ...
- End Select
- End Sub
It works on my pc. But it does not once the DB is put onto server and accessed from another PC (Access 2003). It seems the problem is caused by selecting its caption.
I am really confused. Could someone help me with this?