By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

Access VBA and Opening a Table

100+
P: 118
Hey,

I am making a Database in Access currently on a clothes store warehouse and would like some help with the form.

I didn't know whether to post this in the Access or the VB forum..

So far in the macro code I have

Expand|Select|Wrap|Line Numbers
  1. Sub OpenTbl_Click1()
  2. Dim varAnswer as String
  3.  varAnswer = msgBox("Are you sure you want to continue with this procedure?", vbYes/No, "Warning")
  4.   If varAsnwer = vbNo Then
  5.        Exit Sub
  6.   End if
  7.  
  8. 'code to open read-only table here'  
  9.  
  10. End Sub
  11.  
I have made an alert box appear when they click on the command button and when they click 'No' it stays at the original page/form.

Does anyone know the VBA script in Access to open a table in Read-Only view? (On the click of a button)

Thanks

Sam
May 8 '07 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,347
The third parameter of DoCmd.OpenTable lets you set the data mode.
May 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.