powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Глобальная переменная ?
8 сообщений из 8, страница 1 из 1
Глобальная переменная ?
    #32331878
avkv
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Всем привет!
Есть проблемка.
я в своей програме организовал собственную систему доступа.
Когда пользователь входит он вводит логин и я его запоминаю через глобальную переменную.
При запуске форм я проверяю логин в глобальной пременной и определяю права на доступ.
Проблема в том что и иногда теряется глобальная переменная?
Кто знает какие есть варианты запомнить логин.?
Програма под XP на SQL.
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331901
sasha_1
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
извини, а чем тебе таблицы не нравятся?
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331918
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
в реестре
в текстовом файле
в пользовательском свойстве таблицы MDB
в пользовательском свойстве проекта ADP
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331924
avkv
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Как сохранить в пользовательском свойстве(пример)
и как в реестре(пример)
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331929
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Public Sub setperiod(data As Date)
Dim prp As Property
CurrentProject.Properties("firstdate") = firstdate(data)
CurrentProject.Properties("lastdate") = lastdate(data)
'CurrentProject.Properties.Add "lastdate", data ' так создают
End Sub


Public Function gfd()
'get first date
gfd = CDate(CurrentProject.Properties("firstdate"))
End Function

Public Function Gld()
'get last date
Gld = CDate(CurrentProject.Properties("lastdate"))
End Function
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331930
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
GetSetting Function


Returns a key setting value from an application's entry in the Windows registry or (on the Macintosh) information in the application’s initialization file.

Syntax

GetSetting(appname, section, key[, default])

The GetSetting function syntax has these named arguments:

Part Description
appname Required. String expression containing the name of the application or project whose key setting is requested. On the Macintosh, this is the filename of the initialization file in the Preferences folder in the System folder.
section Required. String expression containing the name of the section where the key setting is found.
key Required. String expression containing the name of the key setting to return.
default Optional. Expression containing the value to return if no value is set in the key setting. If omitted, default is assumed to be a zero-length string ("").



Remarks

If any of the items named in the GetSetting arguments do not exist, GetSetting returns the value of default.

-----------------------------

SaveSetting Statement


Saves or creates an application entry in the application's entry in the Windows registry or (on the Macintosh) information in the application’s initialization file.

Syntax

SaveSetting appname, section, key, setting

The SaveSetting statement syntax has these named arguments:

Part Description
appname Required. String expression containing the name of the application or project to which the setting applies. On the Macintosh, this is the filename of the initialization file in the Preferences folder in the System folder.
section Required. String expression containing the name of the section where the key setting is being saved.
key Required. String expression containing the name of the key setting being saved.
setting Required. Expression containing the value that key is being set to.



Remarks

An error occurs if the key setting can’t be saved for any reason.
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331932
avkv
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Спасибо попробую!
...
Рейтинг: 0 / 0
Глобальная переменная ?
    #32331933
Фотография АлексейК
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
пожайлуста
...
Рейтинг: 0 / 0
8 сообщений из 8, страница 1 из 1
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Глобальная переменная ?
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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