G
Guest
Hey Guyz,
Pls help me out. I’m a COMPLETE novice with programming but can string one
or two lines together (might not seem that way from what I’m about to ask
though):
Riiight, so I have a form that runs off a straight-forward table. This form
shows vehicle transfer bookings.
Each booking has a "message" field that will later be linked to a
cellphone-txt-message system but for now im happy with just having that
"message" text box, as is, as the user will just copy and paste the text to
the third party software to transmit the message via cellphone.
This message will be sent to the driver to inform him of his next job btw.
Anyway, so here's the situation/problem:
My "Message" text box is a TRIM of multiple fields and text strings (that
works perfectly though thanks!)
There are 5 kinds of possible messages and i want to ONLY display the
relevant message to the user for each line/entry. (The form is a Continuous
Form)
EG: If you booked a "Chauffer Drive" the Chauffer Drive Message would come
up and if you booked a "Point-to-Point" the Point-to-Point message would come
up. (This would be different throughout the lines as different clients book
different kinds of transfers) (sorry if im stating the obvious)
One of the fields in the table that this form runs off determines which
message is the correct one.
This field is called numTransferType
So heres my question: how do i display only the correct "Message" as appose
to all of them in each individual line?
This is my code - please dont laugh - Like i said; HUGE NOVICE!!!
Private Sub Form_Load()
If numTransferType.Value = 1 Then 'Chauffer Drive
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = True
txtTourDriver.Visible = False
End If
If numTransferType.Value = 2 Then 'Point-to-Point
txtPointToPointDriver.Visible = True
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = False
txtTourDriver.Visible = False
End If
If numTransferType.Value = 3 And blnArrival.Value = Yes Then 'Airport
Arrival
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = True
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = False
txtTourDriver.Visible = False
End If
If numTransferType.Value = 3 And blnDeparture.Value = Yes Then 'Airport
Drop Off
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = True
txtChaufferDriver.Visible = False
txtTourDriver.Visible = False
End If
If numTransferType.Value = 3 Then 'Tour
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = False
txtTourDriver.Visible = True
End If
End Sub
When I open the form (for some strange reason) ONLY the TOUR “Messageâ€
appears throughout ALL the lines and I can honestly not figure out why that
is!
(I plan on positioning all the messages on top of each other so that only
the valid message for each line would appear)
Thanks sooooooo much in advance for reading my rather LONG question. Hope I
made sense!
Cheers!
Ant
Pls help me out. I’m a COMPLETE novice with programming but can string one
or two lines together (might not seem that way from what I’m about to ask
though):
Riiight, so I have a form that runs off a straight-forward table. This form
shows vehicle transfer bookings.
Each booking has a "message" field that will later be linked to a
cellphone-txt-message system but for now im happy with just having that
"message" text box, as is, as the user will just copy and paste the text to
the third party software to transmit the message via cellphone.
This message will be sent to the driver to inform him of his next job btw.
Anyway, so here's the situation/problem:
My "Message" text box is a TRIM of multiple fields and text strings (that
works perfectly though thanks!)
There are 5 kinds of possible messages and i want to ONLY display the
relevant message to the user for each line/entry. (The form is a Continuous
Form)
EG: If you booked a "Chauffer Drive" the Chauffer Drive Message would come
up and if you booked a "Point-to-Point" the Point-to-Point message would come
up. (This would be different throughout the lines as different clients book
different kinds of transfers) (sorry if im stating the obvious)
One of the fields in the table that this form runs off determines which
message is the correct one.
This field is called numTransferType
So heres my question: how do i display only the correct "Message" as appose
to all of them in each individual line?
This is my code - please dont laugh - Like i said; HUGE NOVICE!!!
Private Sub Form_Load()
If numTransferType.Value = 1 Then 'Chauffer Drive
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = True
txtTourDriver.Visible = False
End If
If numTransferType.Value = 2 Then 'Point-to-Point
txtPointToPointDriver.Visible = True
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = False
txtTourDriver.Visible = False
End If
If numTransferType.Value = 3 And blnArrival.Value = Yes Then 'Airport
Arrival
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = True
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = False
txtTourDriver.Visible = False
End If
If numTransferType.Value = 3 And blnDeparture.Value = Yes Then 'Airport
Drop Off
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = True
txtChaufferDriver.Visible = False
txtTourDriver.Visible = False
End If
If numTransferType.Value = 3 Then 'Tour
txtPointToPointDriver.Visible = False
txtAirportCollectionDriver.Visible = False
txtAirportDropOffDriver.Visible = False
txtChaufferDriver.Visible = False
txtTourDriver.Visible = True
End If
End Sub
When I open the form (for some strange reason) ONLY the TOUR “Messageâ€
appears throughout ALL the lines and I can honestly not figure out why that
is!
(I plan on positioning all the messages on top of each other so that only
the valid message for each line would appear)
Thanks sooooooo much in advance for reading my rather LONG question. Hope I
made sense!
Cheers!
Ant