taniadimitri
Registered User.
- Local time
- Yesterday, 23:02
- Joined
- Mar 13, 2007
- Messages
- 17
I have a form with 9 tabs. Each tab has a multiple questions and drop downs. I was trying to add new questions to a tab. Below is the code for it.
code:
For x = 1 To TotQues
Form("Drop" & x).Visible = False
Form("Drop" & x).TabStop = False
Form("Q" & x).value = Null
Form("Pt" & x).Visible = False
Next x
Set rstlog = dbslog.OpenRecordset(sSql, dbOpenSnapshot)
With rstlog
For i = 1 To TotQues
If rstlog.EOF Then
For x = i To TotQues
Form("Drop" & x).Visible = False
Form("Drop" & x).TabStop = False
Form("Q" & x).value = Null
Next x
Exit For
End If
If (i >= 1 And i <= 8 And !SecTitle = "Appraiser") Or _
(i >= 9 And i <= 16 And !SecTitle = "Subject") Or _
(i >= 17 And i <= 24 And !SecTitle = "Neighborhood") Or _
(i >= 25 And i <= 32 And !SecTitle = "Site") Or _
(i >= 33 And i <= 44 And !SecTitle = "Improvements") Or _
(i >= 45 And i <= 70 And !SecTitle = "Sales Comparison") Or _
(i >= 71 And i <= 78 And !SecTitle = "Value") Or _
(i >= 79 And i <= 86 And !SecTitle = "Addendum") Or _
(i >= 87 And i <= 102 And !SecTitle = "Other") Or _
(i >= 103 And i <= 104 And !SecTitle = "Site") Then (This is the one I added newly)
Form("Q" & i).value = !Question
row = "SELECT ComboList FROM tbl_app_rev_combo where ComboNum = '" & !Combo & "' ORDER BY SrtOrd"
Form("Comb
ption" & i).value = !Combo
Form("drop" & i).RowSource = row
Form("drop" & i) = !Default
Form("Drop" & i).Visible = True
Form("Drop" & i).TabStop = True
Form("Pt" & i).Visible = True
Form("Pt" & i) = !DefaultPts
.MoveNext
Else
Form("Drop" & i).Visible = False
Form("Drop" & i).TabStop = False
Form("Pt" & i).Visible = False
End If
Next i
End With
My issue is I am able to see the Questions untill "Site" tab. The questions after this tab have disappeared. This is because after i = 104 it is not going back to i = 33 and so all the questions in other tabs are gone. Is there any solution for this. How do I get get back the questions in other tabs?
I am attaching the screen shot of "site" tab and "improvements tab whic is next to the site tab.
Thanks,
code:
For x = 1 To TotQues
Form("Drop" & x).Visible = False
Form("Drop" & x).TabStop = False
Form("Q" & x).value = Null
Form("Pt" & x).Visible = False
Next x
Set rstlog = dbslog.OpenRecordset(sSql, dbOpenSnapshot)
With rstlog
For i = 1 To TotQues
If rstlog.EOF Then
For x = i To TotQues
Form("Drop" & x).Visible = False
Form("Drop" & x).TabStop = False
Form("Q" & x).value = Null
Next x
Exit For
End If
If (i >= 1 And i <= 8 And !SecTitle = "Appraiser") Or _
(i >= 9 And i <= 16 And !SecTitle = "Subject") Or _
(i >= 17 And i <= 24 And !SecTitle = "Neighborhood") Or _
(i >= 25 And i <= 32 And !SecTitle = "Site") Or _
(i >= 33 And i <= 44 And !SecTitle = "Improvements") Or _
(i >= 45 And i <= 70 And !SecTitle = "Sales Comparison") Or _
(i >= 71 And i <= 78 And !SecTitle = "Value") Or _
(i >= 79 And i <= 86 And !SecTitle = "Addendum") Or _
(i >= 87 And i <= 102 And !SecTitle = "Other") Or _
(i >= 103 And i <= 104 And !SecTitle = "Site") Then (This is the one I added newly)
Form("Q" & i).value = !Question
row = "SELECT ComboList FROM tbl_app_rev_combo where ComboNum = '" & !Combo & "' ORDER BY SrtOrd"
Form("Comb

Form("drop" & i).RowSource = row
Form("drop" & i) = !Default
Form("Drop" & i).Visible = True
Form("Drop" & i).TabStop = True
Form("Pt" & i).Visible = True
Form("Pt" & i) = !DefaultPts
.MoveNext
Else
Form("Drop" & i).Visible = False
Form("Drop" & i).TabStop = False
Form("Pt" & i).Visible = False
End If
Next i
End With
My issue is I am able to see the Questions untill "Site" tab. The questions after this tab have disappeared. This is because after i = 104 it is not going back to i = 33 and so all the questions in other tabs are gone. Is there any solution for this. How do I get get back the questions in other tabs?
I am attaching the screen shot of "site" tab and "improvements tab whic is next to the site tab.
Thanks,