Moving information between textboxes

  • Thread starter Thread starter CF
  • Start date Start date
C

CF

I was working on this last week, but haven't got a
response on how to deal with this situation. I was hoping
someone might shed an idea on how to tackle this.
Here it goes.
I have a form with customer information. When the user
clicks the submit button it runs a report with the
pertinent information. Now I need to setup a report by
the user's sequence request order. So I have a second
form opened and allows the user to select the order in
which they want the information displayed. I have 6
checkboxes and 6 textboxes each labeled 1 through 6. When
the user selects a checkbox then the next available
textbox is filled in with information. When the checkbox
is clicked to clear then the textbox with the information
is cleared. Now here is where I run into problems how do
I move the information from one textbox to the one above
if one of the textboxes is cleared by the checkbox? Also,
should I be thinking of using a listbox versus the
textboxes? If so, how do input the information in the
listbox? So far all these are unbound.

thanks for any suggestions
 
Never mind I think I have it.

if
Some language to fill the required box

Else
Dim i As Integer
For i = 0 To Me.Count - 1
If TypeOf Me(i) Is TextBox Then
If Me(i) = "Some Message" Then
Me(i) = Null
End If
End If
On Error Resume Next
Next i
If IsNull(Me.txt1) Then
Me.txt1 = Me.txt2
Me.txt2 = Me.txt3
Me.txt3 = Me.txt4
Me.txt4 = Me.txt5
Me.txt5 = Me.txt6
Me.txt6 = Null
ElseIf IsNull(Me.txt2) Then
Me.txt2 = Me.txt3
Me.txt3 = Me.txt4
Me.txt4 = Me.txt5
Me.txt5 = Me.txt6
Me.txt6 = Null
ElseIf IsNull(Me.txt3) Then
Me.txt3 = Me.txt4
Me.txt4 = Me.txt5
Me.txt5 = Me.txt6
Me.txt6 = Null
ElseIf IsNull(Me.txt4) Then
Me.txt4 = Me.txt5
Me.txt5 = Me.txt6
Me.txt6 = Null
ElseIf IsNull(Me.txt5) Then
Me.txt5 = Me.txt6
Me.txt6 = Null
End If
End If
 
Back
Top