473,398 Members | 2,343 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,398 software developers and data experts.

Accessing Form Properties Externally

I have a number of MS databases (MDBs). I have written a program that
will loop through each database and get information from it. I was
able to get the information I needed of all queries within each
database. However, I cannot get the information I need for the forms.
Specifically I need to know the values of the AllowAdditions,
AllowEdits and AllowDeletions properties for each form.

Below is what I started doing. But it doesn't give me what I want.

For i = 0 To (db.Containers("Forms").Documents.Count - 1)
If (Len(db.Containers("Forms").Documents(i).Propertie s("RecordSource"))
0) Then

l_Action = ""
If (db.Containers("Forms").Documents(i).Properties("A llowAdditions").Value
= True) Then
l_Action = "AllowAdditions = True"
End If
If (db.Containers("Forms").Documents(i).Properties("A llowDeletions").Value
= True) Then
l_Action = "AllowDeletions = True"
End If
If (db.Containers("Forms").Documents(i).Properties("A llowEdits").Value
= True) Then
l_Action = "AllowEdits = True"
End If
If (l_Action <> "") Then
rs.AddNew
rs![AppName] = AppName
rs![ObjectName] =
db.Containers("Forms").Documents(i).Name
rs![ObjectType] = "FORM"
rs![Action] = l_Action
rs![SQLStatement] = db.QueryDefs(i).SQL
rs.Update
End If
End If
Next
Nov 13 '05 #1
1 1895
Paul wrote:
I have a number of MS databases (MDBs). I have written a program that
will loop through each database and get information from it. I was
able to get the information I needed of all queries within each
database. However, I cannot get the information I need for the forms.
Specifically I need to know the values of the AllowAdditions,
AllowEdits and AllowDeletions properties for each form.

Below is what I started doing. But it doesn't give me what I want.

For i = 0 To (db.Containers("Forms").Documents.Count - 1)
If (Len(db.Containers("Forms").Documents(i).Propertie s("RecordSource"))
0) Then


l_Action = ""
If (db.Containers("Forms").Documents(i).Properties("A llowAdditions").Value
= True) Then
l_Action = "AllowAdditions = True"
End If
If (db.Containers("Forms").Documents(i).Properties("A llowDeletions").Value
= True) Then
l_Action = "AllowDeletions = True"
End If
If (db.Containers("Forms").Documents(i).Properties("A llowEdits").Value
= True) Then
l_Action = "AllowEdits = True"
End If
If (l_Action <> "") Then
rs.AddNew
rs![AppName] = AppName
rs![ObjectName] =
db.Containers("Forms").Documents(i).Name
rs![ObjectType] = "FORM"
rs![Action] = l_Action
rs![SQLStatement] = db.QueryDefs(i).SQL
rs.Update
End If
End If
Next

Here's a sample you can modify
Public Sub FormsAllow()
Dim dbs As Database
Dim doc As Document
Dim frm As Form

Set dbs = CurrentDb

With dbs.Containers!Forms
For Each doc In .Documents
DoCmd.OpenForm doc.Name, acDesign, , , , acHidden
Set frm = Forms(doc.Name)
debug.print frm.Name,frm.AllowAdditions
Set frm = Nothing
DoCmd.Close acForm, doc.Name
Next doc
End With

MsgBox "Done. View immediate window for results"
End Sub
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John A. Janes | last post by:
Here's an odd one, I'm currently developing a site for internal usage, to get around their public website, I set the internal server to port 8080 (I publish my .net from my office externally). ...
3
by: Terry Hancock | last post by:
Frankly, I was surprised this worked at all, but I tried creating a property outside of a class (i.e. at the module level), and it seems to behave as a property: >>> def get_x(ob): .... ...
6
by: arvee | last post by:
Is there a way to access controls (and their properties) in a user control? The Web Form Designer marks controls as 'Protected' which makes them inaccessable from the host form. If I mark them as...
4
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a...
8
by: Mike Caputo | last post by:
In VB.NET, need to be able to access certain properties on my main form from other forms. These are properties that may be changed by the user, so I have to be able to get to them throughout the...
8
by: dwok | last post by:
I have been wondering this for a while now. Suppose I have a class that contains some private member variables. How should I access the variables throughout the class? Should I use properties that...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
4
by: Suresh | last post by:
Is there any way to access the custom properties of a master page from the aspx form? I know the custom properties of a master page can be accessed from the aspx.cs partial class by specifying...
13
by: raylopez99 | last post by:
I'm going through a book by Jon Skeet that mentions automatically implemented properties, but it doesn't do a good job of explaining why you should bother and what is going on behind the scenes. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.