azizrasul
Well-known Member
- Joined
- Jul 7, 2003
- Messages
- 1,304
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
I have a form with 7 text boxes and 4 combos. They are named txt1, txt2, ... txt7, cbo1, cbo2, ... cbo4. The values in these controls make up a telephone number.
The text boxes have fixed values of 0121458.
The combos cbo1 & cbo2 can have the following values 0-9, *, Even or Odd.
The combos cbo3 & cbo4 can have the values 0-9.
The task is to make a selection in the combos and run a query based the telephone number. Hence I can have the following telephone numbers: -
01214580000
0121458**13
0121458Even234
0121458Odd456
0121458EvenOdd842
0121458*Odd43
and so on.
I have been trying the following telephone number: -
0121458**48
knowing that there are telephone numbers like 01214580048, 01214583248, etc.
My VBA code combines the values in a label i.e.
Me.lblTN.Caption = Me.txt1 & Me.txt2 & Me.txt3 & Me.txt4 & Me.txt5 & Me.txt6 & Me.txt7 & Me.cbo1 & Me.cbo2 & Me.cbo3 & Me.cbo4
I then use: -
[Forms]![frmSFF Creation]![lblTN].[Caption]
When I run the query, I don't get any records appearing when Me.lblTN.Caption = 0121458**48
The text boxes have fixed values of 0121458.
The combos cbo1 & cbo2 can have the following values 0-9, *, Even or Odd.
The combos cbo3 & cbo4 can have the values 0-9.
The task is to make a selection in the combos and run a query based the telephone number. Hence I can have the following telephone numbers: -
01214580000
0121458**13
0121458Even234
0121458Odd456
0121458EvenOdd842
0121458*Odd43
and so on.
I have been trying the following telephone number: -
0121458**48
knowing that there are telephone numbers like 01214580048, 01214583248, etc.
My VBA code combines the values in a label i.e.
Me.lblTN.Caption = Me.txt1 & Me.txt2 & Me.txt3 & Me.txt4 & Me.txt5 & Me.txt6 & Me.txt7 & Me.cbo1 & Me.cbo2 & Me.cbo3 & Me.cbo4
I then use: -
[Forms]![frmSFF Creation]![lblTN].[Caption]
When I run the query, I don't get any records appearing when Me.lblTN.Caption = 0121458**48