Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Changing Form's...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 30577 of 31576
Post > Topic >>

Changing Form's view in VBA

by RLN <nospamrln@[EMAIL PROTECTED] > Jun 24, 2008 at 04:09 PM

I have a form that does not display correctly.
frm1 opens frm2 via a command button.

My three problems with frm2:
1. Displays in form view when called from the button.
   (should be datasheet view)
2. "Shortcut Menu" is set to "Yes", however I cannot right click in the
form to go to design view.

These properties are already set on frm2:
"Shortcut Menu is set to "Yes"
View is set to "Datasheet view" by default.
"Allow pivot view", and "allow form view" are both set to "no.

Here is my code that launches frm2:

strSQL1 = "Select Field1, Field2 FROM tblX"

'open the form
DoCmd.OpenForm "frm2"

Forms!frmCurrentBatches.RecordSource = strSQL1

Forms!frmCurrentBatches.Refresh
Forms!frmCurrentBatches.Visible = True

- - - - - - -
'When trying to set the view to datasheet,these 2 lines did not work...
'Forms!frmCurrentBatches.DefaultView = 2
' DoCmd.OpenForm FormName:=frm2, View:=acFormDS

Finally, I need to disallow the user the op****tunity to right click on
any form they have loaded.  I don't want them to have the op****tunity to
get to design mode.
Is there a simple way to set the 'allow shortcut menu'  property to "no"
on all of the forms when the app loads, then set that property on all
forms back to "yes" when the app closes?

Any suggestions would be helpful.

Thnx.....



*** Sent via Developersdex http://www.developersdex.com
***
 




 5 Posts in Topic:
Changing Form's view in VBA
RLN <nospamrln@[EMAIL   2008-06-24 16:09:33 
Re: Changing Form's view in VBA
"Linq Adams via Acce  2008-06-25 02:10:20 
Re: Changing Form's view in VBA
"Allen Browne"   2008-06-25 20:18:05 
Re: Changing Form's view in VBA
RLN <nospamrln@[EMAIL   2008-06-26 16:52:25 
Re: Changing Form's view in VBA
"Allen Browne"   2008-06-27 12:22:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:19:05 CST 2008.