syntnx
asked on
acCmdFormView for datasheet
Good morning.
Here's my problem. I have a form "frmDataEntry" that has a subform on it called "fsubCalibration". The subforms default view is datasheet, but all views are set as available in the properties.
I want to creat a button on the main form with the onclick event or a double click event on the subforms field memProcedure that runs the DoCmd.RunCommand acCmdFormView action.
Specifically I want to make it easy for the user to change the subform from datasheet to form (note: I have the start up settings locking menus and right clicks down).
Ive tried the button by settinng the focus to the subform and running the cmd.
Ive also tried getting several events to fire on the field memProcedure in the subform unsucessfully.
Anyone have any suggestions. I am sure this is pretty simply.
thanks!!!
syntnx
Here's my problem. I have a form "frmDataEntry" that has a subform on it called "fsubCalibration". The subforms default view is datasheet, but all views are set as available in the properties.
I want to creat a button on the main form with the onclick event or a double click event on the subforms field memProcedure that runs the DoCmd.RunCommand acCmdFormView action.
Specifically I want to make it easy for the user to change the subform from datasheet to form (note: I have the start up settings locking menus and right clicks down).
Ive tried the button by settinng the focus to the subform and running the cmd.
Ive also tried getting several events to fire on the field memProcedure in the subform unsucessfully.
Anyone have any suggestions. I am sure this is pretty simply.
thanks!!!
syntnx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks Steve, beat you to it
;)
;)
did you set the focus to the subform first?
are you using the correct command?
Steve
are you using the correct command?
Steve
ASKER
have to setfocus with the button but doubleclick works without because Im already on subform
syntnx
syntnx
ASKER
Steve,
Im reqrding you the points and asking CS to cancel my request to delete the post. Think it may be helpful to others in the future
thanks again
syntnx
Im reqrding you the points and asking CS to cancel my request to delete the post. Think it may be helpful to others in the future
thanks again
syntnx
did you end up using acCmdSubformDatasheet or acCmdSubformDatasheetView?
ASKER
datasheet actually
After playing with this a bit I found that using acCmdSubformDatasheet is really a toggle between form and datasheet view types and acCmdSubformDatasheetView will only change it to datasheet.
Steve
Steve
ASKER
Ahhh, thought it was strange it would change back and forth. But hey that may be better. Otherwise I would have to create a separate event or button for changing it back
Learn something new everyday!
syntnx
Learn something new everyday!
syntnx
exactly what I was thinking, I am off from work today but on Monday I will be changing a couple of my standards :-)
Steve
Steve
ASKER
Its :
DoCmd.RunCommand (acCmdSubformDatasheet)
not
acCmdFormView
syntnx