Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 30th, 2003, 11:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default Detecting Read-Only

I have an application with which the users generate reports from a CD containing an Access database. Is there a way (method) to detect whether an Access database is installed on a read-only device. That way I can disable certain operations (such as updating the data) which are inappropriate on a read-only device.

Rand
__________________
Rand
 
Old October 30th, 2003, 12:04 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Data ca not be updated to a read only device, specially a cd.
Now the question.
Is that database on the cd pointing to a live database by some sort of link?




Sal
 
Old October 30th, 2003, 12:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If the database is run from the CD (read-only) I want to disable (or hide) the buttons that update the data. On the other hand, if the database is moved onto a readable device (such as a hard disk or CD-RW) I would like the update buttons enabled.

Rand
 
Old October 30th, 2003, 12:30 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you tried to update data on a CD?
It will not work. Try it.



Sal
 
Old October 30th, 2003, 12:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know it won't work. I want to make certain that the users can't even try (proactive error avoidance).

Rand
 
Old October 30th, 2003, 12:49 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A bit too proactive. If they can't break it, why bother?
If the CD database does not point to a database, DSN or by code to an actual database, or if the database on the cd only points to its own data, leave it as is.

In fact, even if you copy the database to a C:/ drive with full rights, the dataabse will still be marked as read-only.



Sal
 
Old October 30th, 2003, 04:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The code here http://www.mvps.org/access/api/api0003.htm can used to check if a particular drive is a cd-rom.



Brian Skelton
Braxis Computer Services Ltd.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Detecting a Yahoo Toolbar MosheGolden Javascript How-To 0 November 12th, 2006 04:42 AM
detecting if Word is open Loralee Access 7 October 20th, 2006 01:48 PM
Detecting AOL browser isheikh Javascript 6 June 4th, 2004 11:36 AM
Detecting if a dll is registered pilmart Pro VB 6 0 May 17th, 2004 02:01 AM
detecting a form nfontaine Javascript How-To 2 April 20th, 2004 06:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.