cricketbird
Registered User.
- Local time
- Today, 07:33
- Joined
- Jun 17, 2013
- Messages
- 118
I am trying to code a button that switches between two nearly identical forms for a touchscreen interface. The content is identical, but one layout (form) is for left-handed folks and the other is for right-handed folks. I'm trying to make it so that clicking the button toggles from one form to the other. It should be seamless to the user and keep them at the same record they were on.
I can open the form using a filter, which filters to a subset of records specific for this user/workstation (this is working fine). But, I want to jump to the specific record the user was on when they clicked the toggle button so the swap does not break their workflow. Somehow I cannot get this to work. It always jumps to the "first" filtered record instead of the same record as on the original form.
Any suggestions?
-CB
Button on "Leftie" form:
Code module of "Rightie" form:
I can open the form using a filter, which filters to a subset of records specific for this user/workstation (this is working fine). But, I want to jump to the specific record the user was on when they clicked the toggle button so the swap does not break their workflow. Somehow I cannot get this to work. It always jumps to the "first" filtered record instead of the same record as on the original form.
Any suggestions?
-CB
Button on "Leftie" form:
Code:
DoCmd.OpenForm "TouchScreen-RIGHTIE", acNormal, , "WorkstationID = " & Me.CmbPickTable, , , Me.DIETID
Me.Visible = False
Code module of "Rightie" form:
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.SelectObject acForm, , True
If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst "DIETID = " & Me.OpenArgs
If Not .NoMatch Then
Me.Bookmark = .Bookmark
Me.OpenArgs = Null
End If
End With
End If
Call HideToolbars
End Sub