MODIFIED SOURCE CODE FOR Property.frm
Made on Tuesday, Apr 8, 2003 at 9:43 AM
Option Explicit
'>>>>>>>>>>>>>>>>>>>>>>>>
'ResMe Converted To A Property: Const FORMCAPTION = " Property Value"
'ResMe Converted To A Property: Const BUTTON1 = "&OK"
'ResMe Converted To A Property: Const BUTTON2 = "&Cancel"
'ResMe Converted To A Property: Const Label1 = "&Enter property value:"
'>>>>>>>>>>>>>>>>>>>>>>>>
Public PropObject As DAO.Property
Public OK As Boolean
Private Sub cmdCancel_Click()
OK = False
Me.Hide
End Sub
Private Sub cmdOK_Click()
On Error GoTo cmdOK_ClickErr
'try to set it
If PropObject.Type = dbBoolean Then
PropObject.Value = (chkPropValue.Value = vbChecked)
Else
If txtPropValue.Text <> PropObject.Value Then
'reset if changed
PropObject.Value = txtPropValue.Text
End If
End If
OK = True
Me.Hide
Exit Sub
cmdOK_ClickErr:
MsgBox Err.Description
If PropObject.Type = dbBoolean Then
chkPropValue.SetFocus
Else
txtPropValue.SetFocus
End If
End Sub
Private Sub Form_Load()
'ResMe autogenerated line of code to call the initialization routine that was automatically generated.
Call frmProperty_Auto_Init
Me.Caption = PropObject.Name & FORMCAPTION
cmdOK.Caption = BUTTON1
cmdCancel.Caption = BUTTON2
lblLabel.Caption = Label1
'setup the controls for the prop type
If PropObject.Type = dbBoolean Then
txtPropValue.Visible = False
chkPropValue.TabIndex = 1
chkPropValue.Caption = PropObject.Name
chkPropValue.Value = (PropObject.Value And vbChecked)
Else
txtPropValue.Text = PropObject.Value
End If
End Sub
'*********************************************************************************
'** This Section Of Code Was Automatically Generated By ResMe **
'** **
'** String assignments to Constants have been converted to read-only properties **
'*********************************************************************************
'This was: Const FORMCAPTION = " Property Value"
Property Get FORMCAPTION As String
'WAS: FORMCAPTION = " Property Value"
FORMCAPTION = LoadResString(S422_Property_Value)
End Property
'This was: Const BUTTON1 = "&OK"
Property Get BUTTON1 As String
BUTTON1 = "&OK"
End Property
'This was: Const BUTTON2 = "&Cancel"
Property Get BUTTON2 As String
'WAS: BUTTON2 = "&Cancel"
BUTTON2 = LoadResString(S84_Cancel)
End Property
'This was: Const Label1 = "&Enter property value:"
Property Get Label1 As String
'WAS: Label1 = "&Enter property value:"
Label1 = LoadResString(S200_Enter_property_valu)
End Property
Private Sub frmProperty_Auto_Init()
'This routine initializes all User Interface control properties on frmProperty.
'This section of code was automatically generated by the ResMe String Extraction Utility.
'WAS: Me.Caption = "Property Value"
Me.Caption = LoadResString(S423_Property_Value)
'WAS: cmdCancel.Caption = "&Cancel"
cmdCancel.Caption = LoadResString(S84_Cancel)
'WAS: cmdOK.Caption = "&OK"
cmdOK.Caption = LoadResString(S355_OK)
'WAS: chkPropValue.Caption = "Check1"
chkPropValue.Caption = LoadResString(S88_Check1)
'WAS: lblLabel.Caption = "&Enter property value:"
lblLabel.Caption = LoadResString(S200_Enter_property_valu)
End Sub