473,320 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Access VBA and Opening a Table

118 100+
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
1 2527
Rabbit
12,516 Expert Mod 8TB
The third parameter of DoCmd.OpenTable lets you set the data mode.
May 8 '07 #2

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

Similar topics

4
by: Brian Andrus | last post by:
Ok. I upgraded to MS Access 2003 recently and now I am having great heartache. In Access 2002, when I opened a table to view the data, there were wonderful little "plus" signs that I could click...
9
by: Rob | last post by:
Scenario: O/S: Win XP Professional Back-end: Access 2002 on network server I have an Access 97 application, in production on our network, that takes appoximately 5 minutes to process monthly...
3
by: Mike Wilson | last post by:
Is there a way to open an OLE DB database from within Access? I would like to use the Access GUI with its table and query explorer to examine a database only available through an OLEDB provider...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
6
by: kwdavids | last post by:
I'm getting occasional instances of the error: SQL Server does not exist or access denied I get the error both in application code and from Enterprise Manager. The database is LOCAL. ...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
2
by: Brian K. | last post by:
I've read several posts on this problem, since it's happening to me right now. Can't seem to get rid of this. Using A2K2 on a large XP network. PC front ends linked to a backend on a shared...
1
by: Chris | last post by:
Hi, I'm using the following code DataTable tables = ((OleDbConnection)oleconn).GetOleDbSchemaTable( OleDbSchemaGuid.Tables, new object { null, null, null, "TABLE" }); foreach (DataRow r in...
2
by: ARC | last post by:
Just curious if anyone is having issues with Acc 2007 once the number of objects and complexity increases? I have a fairly large app, with many linked tables, 100's of forms, queries, reports, and...
16
by: Phil Stanton | last post by:
I have a form with a button which is supposed to open an Excel file (With lots of Macros /VBA) in it. The Excel file gets it's data from the Access program Here is the code Private Sub...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.