Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15807

Maskedbox.Mask

$
0
0
Hi
I am really stumped I want to use a MaskedBox on a form so I can sort for different Masks
Code:

VB6

Private Sub Form_Load()
frmTopFront.adoBanking.Recordset.MoveFirst
mebPCode.Mask = "&&& &&&"


  With Me
      .Left = 0
      .Top = 0
      .Height = 7110
      .Width = 11800
  End With
 
 
  With frmTopFront
      If AddEditAns = True Then
        If Not .adoBanking.Recordset.EOF Then
          Me.Caption = Me.Caption & "Edit Bank Address"
          txtBank = VBA.StrConv(.dgdBanking.Columns(1), VBA.vbProperCase)
          txtRoad = VBA.StrConv(.dgdBanking.Columns(34), VBA.vbProperCase)
          txtTown = VBA.StrConv(.dgdBanking.Columns(35), VBA.vbProperCase)
          txtCounty = VBA.StrConv(.dgdBanking.Columns(36), VBA.vbProperCase)
          mebPCode = VBA.StrConv(.dgdBanking.Columns(37), VBA.vbUpperCase)
              If Len(mebPCode) = 7 Then
                mebPCode.Mask = "&&& &&&"
              ElseIf Len(mebPCode) = 8 Then
                mebPCode.Mask = "&&&& &&&"
              Else
                mebPCode.Mask = "&&&& &&&&"
              End If
          txtCountry = VBA.StrConv(.dgdBanking.Columns(38), VBA.vbUpperCase)
        End If
      ElseIf AddEditAns = False Then
        Me.Caption = Me.Caption & "Adding New Address"
        txtBank = VBA.StrConv(.dgdBanking.Columns(1), VBA.vbProperCase) 'frmBanking.txtName
        txtRoad = vbNullString
        txtTown = vbNullString
        txtCounty = vbNullString
        mebPCode.Mask = ""
 '        mebPCode.Mask = "&&& &&&"
        txtCountry = vbNullString
 '        cmdNext.Visible = False
        Call unLockTextBox
      End If
  End With
     
End Sub

When I try to create a *.exe for the project I get an error at this point mebPCode.Mask = "&&& &&&" it highlights Mask
Method or Data Member not found I think this means a Get/Let if true I have no idea how to do that I have some already for Arrays
But thats all can you help please Note The project runs OK

Viewing all articles
Browse latest Browse all 15807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>