Display switchboard name in textbox on switchboard form

G

Guest

How do I go about displaying switchboard name in textbox on switchboard form.

My switchboards setup has a number of sub-swtichboards and I would like the name of this to update as the user navigates.

After looking at the table Switchboard Item, I guess I need to show the Item Text for ItemNumber 0 which each matching SwitchboardID.

However, can somebody help me on how to do this please.

Regards,

Bruce
 
F

fredg

How do I go about displaying switchboard name in textbox on switchboard form.

My switchboards setup has a number of sub-swtichboards and I would like the name of this to update as the user navigates.

After looking at the table Switchboard Item, I guess I need to show the Item Text for ItemNumber 0 which each matching SwitchboardID.

However, can somebody help me on how to do this please.

Regards,

Bruce

Unless you have modified the built-in Access Switchboard, the main
label is actually 2 labels offset a bit to give a shadowed effect.

Display the Switchboards code window.

Find the Private Sub FillOptions() sub-procedure.

Find the If(rst.EOF) line, and add the 2 lines of code shown with the
*** below so that that portion looks like this:

If (rst.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this
switchboard page"
Else
While (Not (rst.EOF))
Me("Option" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Caption =
rst![ItemText]
rst.MoveNext
Wend
End If

Label1.Caption = Me.Caption ' *** ADD
Label2.Caption = Me.Caption ' *** ADD

' Close the recordset and the database.
rst.Close
dbs.Close

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top