C
copprtop116
Long time viewer, first time participant. Love the site, it is immensely
helpful.
Situation. I inherited a database in which depending on the selection chose
from a combo box on a form, a text box on the same form would be completed
with the desired verbiage which can be altered. The creator used an "event
procedure" on the combo box "after update" that will use a statement to fill
in the data.
"Phase" is the combo box and "PhaseDetails" is the text box.
"After Update" vb Code:
Private Sub Phase_AfterUpdate()
If Me![Phase] = "Student 1" Then
Me![PhaseDetails] = "1 - Coloring Book" & vbCrLf & "1 - Pint of White
Milk" & vbCrLf & "1 - Afternoon Snack"
ElseIf Me![Phase] = "Student 2" Then
Me![PhaseDetails] = "1 - Coloring Book" & vbCrLf & "1 - Pint of
Chocolate Milk" & vbCrLf & "1 - Afternoon Snack" & vbCrLf & "1 - Lunch
Ticket"
ElseIf Me![Phase] = "Student 3" Then
Me![PhaseDetails] = "1 - Alphabet Coloring Book" & vbCrLf & "2 - Pints
of Milk (choice)" & vbCrLf & "1 - Afternoon Snack" & vbCrLf & "1 - Lunch
Ticket"
End If
End Sub
Now by the time I get to the upper grades, the list of items becomes very
long. And the text in vb code can not be formatted or spaced properly so the
words do not align and the text box verbiage looks sloppy.
My attempt was to use an external word doc for these long phase details. Now
is this possible? Will the text of that imported word doc show up in the
phase details table?
Any help, ideas or suggestions would be greatly appreciated.
Thanks!
color me extremely frustrated!
helpful.
Situation. I inherited a database in which depending on the selection chose
from a combo box on a form, a text box on the same form would be completed
with the desired verbiage which can be altered. The creator used an "event
procedure" on the combo box "after update" that will use a statement to fill
in the data.
"Phase" is the combo box and "PhaseDetails" is the text box.
"After Update" vb Code:
Private Sub Phase_AfterUpdate()
If Me![Phase] = "Student 1" Then
Me![PhaseDetails] = "1 - Coloring Book" & vbCrLf & "1 - Pint of White
Milk" & vbCrLf & "1 - Afternoon Snack"
ElseIf Me![Phase] = "Student 2" Then
Me![PhaseDetails] = "1 - Coloring Book" & vbCrLf & "1 - Pint of
Chocolate Milk" & vbCrLf & "1 - Afternoon Snack" & vbCrLf & "1 - Lunch
Ticket"
ElseIf Me![Phase] = "Student 3" Then
Me![PhaseDetails] = "1 - Alphabet Coloring Book" & vbCrLf & "2 - Pints
of Milk (choice)" & vbCrLf & "1 - Afternoon Snack" & vbCrLf & "1 - Lunch
Ticket"
End If
End Sub
Now by the time I get to the upper grades, the list of items becomes very
long. And the text in vb code can not be formatted or spaced properly so the
words do not align and the text box verbiage looks sloppy.
My attempt was to use an external word doc for these long phase details. Now
is this possible? Will the text of that imported word doc show up in the
phase details table?
Any help, ideas or suggestions would be greatly appreciated.
Thanks!
color me extremely frustrated!