But you never share the error message. The best clue is that error plus your code and more information.
Bob
Im not much of a VB person, but this script some how found its way into my hands for troubleshooting. Could anyone shed some light on this. All I know is that when this is compiled this bit somehow shows up as an error.
stSql = stSql & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" &
Me![SwitchboardID]
stSql = stSql & " ORDER BY [ItemNumber];"
Set rs = CreateObject("ADODB.Recordset")
rs.Open stSql, con, 1 ' 1 = adOpenKeyset
' If there are no options for this Switchboard Page,
' display a message. Otherwise, fill the page with the items.
If (rs.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rs.EOF))
Me("Option" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Visible = True
Me("OptionLabel" & rs![ItemNumber]).Caption = rs![ItemText]
rs.MoveNext
Wend
End If
' Close the recordset and the database.
rs.Close
Set rs = Nothing
Set con = Nothing
Thanks in advance

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic