ORIGINAL SOURCE CODE FOR Property.frm

Made on Tuesday, Apr 8, 2003 at 9:43 AM

http://www.resourcemining.com

Property.frm contained 8 resource strings and 1 non-user interface strings.

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
    FORMCAPTION = " 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
    BUTTON2 = "&Cancel"
End Property

'This was: Const Label1 = "&Enter property value:"
Property Get Label1 As String
    Label1 = "&Enter property value:"
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.
    Me.Caption = "Property Value"
    cmdCancel.Caption = "&Cancel"
    cmdOK.Caption = "&OK"
    chkPropValue.Caption = "Check1"
    lblLabel.Caption = "&Enter property value:"
End Sub