powered by simpleCommunicator - 2.0.54     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Описание CurrentDb.Properties
9 сообщений из 9, страница 1 из 1
Описание CurrentDb.Properties
    #38061241
Миха неопытный
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Здравствуйте все!

Ткните носом (только не очень сильно :), плизз, в описание параметров CurrentDb.Properties

Туплю, не могу найти. ((

(access2003)
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #38061345
guest_rusimport
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Миха неопытныйЗдравствуйте все!

Ткните носом (только не очень сильно :), плизз, в описание параметров CurrentDb.Properties

Туплю, не могу найти. ((

(access2003)

У CurrentDb.Properties нет параметров , есть методы , все их можно посмотреть в Object Browser ( F2 - в редакторе VBA) , выбрав библиотеку DAO (Classes - Properties)...

А если интересует само описание коллекции Properties - то не судьба набрать в модуле VBA строку CurrentDb.Properties и нажать F1 ?
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #38061362
qwerty112
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
имхо, ТС, - имена, этих самых, пропертей хочет увидеть
и если с заданными по-умолчанию пропертями - просто
Код: vbnet
1.
2.
3.
4.
5.
6.
7.
8.
On Error Resume Next
    Dim pr
    Dim db As DAO.database
    Set db = CurrentDb
    For Each pr In db.Properties
        Debug.Print pr.Name, pr.Value, Err.Description
        Err.Clear
    Next


то, с теми, которые "создаются по требованию" (типа AppTitle, AppIcon, ... AllowBypassKey тот же ... - т.е. какие-то "зарезервированные" имена свойств) - сложнее
я, например, тоже никогда не сталкивался с полным списком ...

походу, вот тут - http://msdn.microsoft.com/en-us/library/office/aa193949(v=office.10).aspx
их нужно "выискивать", только там всё "в куче" - и свойства БД, и свойства форм, и т.д. ...
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #38061392
guest_rusimport
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
в автономной справке тоже найти можно при желании много чего

СправкаShow All

Set Properties of Data Access Objects in Visual Basic
Data Access Objects (DAO) enable you to manipulate the structure of your database and the data it contains from Visual Basic. Many DAO objects correspond to objects that you see in your database— for example, a TableDef object corresponds to a Microsoft Access table. A Field object corresponds to a field in a table.

Most of the properties you can set for DAO objects are DAO properties. These properties are defined by the Microsoft Jet database engine and are set the same way in any application that includes the Jet database engine. Some properties that you can set for DAO objects are defined by Microsoft Access, and aren't automatically recognized by the Jet database engine. How you set properties for DAO objects depends on whether a property is defined by the Jet database engine or by Microsoft Access.

Setting DAO Properties for DAO Objects
To set a property that's defined by the Jet database engine, refer to the object in the DAO hierarchy. The easiest and fastest way to do this is to create object variables that represent the different objects you need to work with, and refer to the object variables in subsequent steps in your code. For example, the following code creates a new TableDef object and sets its Name property:

Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Set dbs = CurrentDb
Set tdf = dbs.CreateTableDef
tdf.Name = "Contacts"

Setting Microsoft Access Properties for DAO Objects
When you set a property that's defined by Microsoft Access, but applies to a DAO object, the Jet database engine doesn't automatically recognize the property as a valid property. The first time you set the property, you must create the property and append it to the Properties collection of the object to which it applies. Once the property is in the Properties collection, it can be set in the same manner as any DAO property.

If the property is set for the first time in the user interface, it's automatically added to the Properties collection, and you can set it normally.

When writing procedures to set properties defined by Microsoft Access, you should include error-handling code to verify that the property you are setting already exists in the Properties collection. See the Help topic about the CreateProperty method or the individual property topic for more information.

Keep in mind that when you create the property, you must correctly specify its Type property before you append it to the Properties collection. You can determine the Type property based on the information in the Settings section of the Help topic for the individual property. The following table provides some guidelines for determining the setting of the Type property.

If the property setting is Then the Type property setting should be
A string dbText
True/False dbBoolean
An integer dbInteger


The following table lists some Microsoft Access–defined properties that apply to DAO objects.

DAO object Microsoft Access–defined properties
Database AppTitle, AppIcon, StartupShowDBWindow, StartupShowStatusBar, AllowShortcutMenus, AllowFullMenus, AllowBuiltInToolbars, AllowToolbarChanges, AllowBreakIntoCode, AllowSpecialKeys, Replicable, ReplicationConflictFunction
SummaryInfo Container Title, Subject, Author, Manager, Company, Category, Keywords, Comments, Hyperlink Base
(See the Summary tab of the DatabaseName Properties dialog box, available by clicking Database Properties on the File menu.)

UserDefined Container (See the Summary tab of the DatabaseName Properties dialog box, available by clicking Database Properties on the File menu.)
TableDef DatasheetBackColor, DatasheetCellsEffect, DatasheetFontHeight, DatasheetFontItalic, DatasheetFontName, DatasheetFontUnderline, DatasheetFontWeight, DatasheetForeColor, DatasheetGridlinesBehavior, DatasheetGridlinesColor, Description, FrozenColumns, RowHeight, ShowGrid
QueryDef DatasheetBackColor, DatasheetCellsEffect, DatasheetFontHeight, DatasheetFontItalic, DatasheetFontName, DatasheetFontUnderline, DatasheetFontWeight, DatasheetForeColor, DatasheetGridlinesBehavior, DatasheetGridlinesColor, Description, FailOnError, FrozenColumns, LogMessages, MaxRecords, RecordLocks, RowHeight, ShowGrid, UseTransaction
Field Caption, ColumnHidden, ColumnOrder, ColumnWidth, DecimalPlaces, Description, Format, InputMask


СправкаShow All

AllowBypassKey Property
You can use the AllowBypassKey property to specify whether or not the SHIFT key is enabled for bypassing the startup properties and the AutoExec macro. For example, you can set the AllowBypassKey property to False to prevent a user from bypassing the startup properties and the AutoExec macro.

Setting
The AllowBypassKey property uses the following settings.

Setting Description
True Enable the SHIFT key to allow the user to bypass the startup properties and the AutoExec macro.
False Disable the SHIFT key to prevent the user from bypassing the startup properties and the AutoExec macro.


You can set this property by using a macro or Visual Basic.

To set the AllowBypassKey property by using a macro or Visual Basic, you must create the property in the following ways:

In a Microsoft Access database (.mdb), you can add it by using the CreateProperty method and append it to the Properties collection of the Database object.
In a Microsoft Access project (.adp), you can add it to the AccessObjectProperties collection of the CurrentProject object by using the Add method.
Remarks
You should make sure the AllowBypassKey property is set to True when debugging an application.

This property's setting doesn't take effect until the next time the application database opens.

Example
The following example shows a procedure named SetBypassProperty that passes the name of the property to be set, its data type, and its desired setting. The general purpose procedure ChangeProperty attempts to set the AllowBypassKey property and, if the property isn't found, uses the CreateProperty method to append it to the Properties collection. This is necessary because this property doesn't appear in the Properties collection until its been added.

Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, False
End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #38061407
qwerty112
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
guest_rusimportв автономной справке тоже найти можно при желании много чего
даа, нашел,

спасибо
Set Properties of Data Access Objects in Visual BasicThe following table lists some Microsoft Access–defined properties that apply to DAO objects.

DAO object Microsoft Access–defined properties Database AppTitle, AppIcon, StartupShowDBWindow, StartupShowStatusBar, AllowShortcutMenus, AllowFullMenus, AllowBuiltInToolbars, AllowToolbarChanges, AllowBreakIntoCode, AllowSpecialKeys, Replicable, ReplicationConflictFunction SummaryInfo Container Title, Subject, Author, Manager, Company, Category, Keywords, Comments, Hyperlink Base (See the Summary tab of the DatabaseName Properties dialog box, available by clicking Database Properties on the File menu.) UserDefined Container (See the Summary tab of the DatabaseName Properties dialog box, available by clicking Database Properties on the File menu.) TableDef DatasheetBackColor, DatasheetCellsEffect, DatasheetFontHeight, DatasheetFontItalic, DatasheetFontName, DatasheetFontUnderline, DatasheetFontWeight, DatasheetForeColor, DatasheetGridlinesBehavior, DatasheetGridlinesColor, Description, FrozenColumns, RowHeight, ShowGrid QueryDef DatasheetBackColor, DatasheetCellsEffect, DatasheetFontHeight, DatasheetFontItalic, DatasheetFontName, DatasheetFontUnderline, DatasheetFontWeight, DatasheetForeColor, DatasheetGridlinesBehavior, DatasheetGridlinesColor, Description, FailOnError, FrozenColumns, LogMessages, MaxRecords, RecordLocks, RowHeight, ShowGrid, UseTransaction Field Caption, ColumnHidden, ColumnOrder, ColumnWidth, DecimalPlaces, Description, Format, InputMask
только почему AllowBypassKey - нет в списке ... (?)
отдельная справка по нему - есть, да
но это ж нужно знать название свойства тогда ... как-то не логично ...
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #38061467
Миха неопытный
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
qwerty112 попал по шляпке, ну а guest_rusimport уже добил :)

Спасибо! Это и не мог найти.

(Хорошо искать, когда знаешь - что и где ;)
...
Рейтинг: 0 / 0
Период между сообщениями больше года.
Описание CurrentDb.Properties
    #39332082
Фотография час58
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Миха неопытный,

Хочу программно убрать значок приложения,
пишу
Код: vbnet
1.
2.
    ChangeProperty "AppIcon", dbText, ""
    Application.RefreshTitleBar



не убирается в свойствах базы надпись пути к значку.

Использовать значок для форм - работает
Код: vbnet
1.
ChangeProperty "UseAppIconForFrmRpt", dbBoolean, False



В чём может быть причина?
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #39332196
guest_rusimport
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
час58,
попробуй :)
Код: vbnet
1.
currentdb.Properties.Delete "AppIcon"
...
Рейтинг: 0 / 0
Описание CurrentDb.Properties
    #39332197
Фотография час58
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
guest_rusimport,
спасибо.
...
Рейтинг: 0 / 0
9 сообщений из 9, страница 1 из 1
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Описание CurrentDb.Properties
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]