Switchboard form playing up?

Gasman

Enthusiastic Amateur
Local time
Today, 08:45
Joined
Sep 21, 2011
Messages
17,499
Hi everyone, stuck again I'm afraid :(

I am using the default switchboard form and all was working fine. However I noticed that whilst I start with 'Main Switchboard', when I go into a sub menu and then exit I am left with 'Reports' as the title of the main switchboard?

This is the default 2007 macro version. Admittedly I amended it for simple user level, but do not think that is the problem?, all the sub menus have the correct titles?

So I exported Switchboard Items table and Switchboard to the attached help db, and just thought I'd try it first.

Due to my access level checking, one needs to set
Tempvars("Userlevel")=1
to see all the entries.

However it works fine in the Help DB.

Trying to debug this I noticed that the labels only had this as their source
Code:
=DLookUp("ItemText","Switchboard Items","[SwitchboardID] = " & TempVars("SwitchboardID"))
I have copied this from the switchboard I created in the Northwind db, so it is the vanilla version.

I believed that we should be looking for ItemNumber = 0 for menu title so amended mine as
Code:
=DLookUp("ItemText","Switchboard Items","[ItemNumber] = 0 AND [SwitchboardID] = " & TempVars("SwitchboardID"))
in an attempt to stop this.
However i still end up with Reports as the title after I exit a sub menu?

I been through the immediate window executing the code.
We start off with Tempvars("switchboardid") = 1, we then get Main Switchboard and if I enter a sub menu and exit and try the immediate window, I get as expected, but the switchbaord says Reports ?:banghead::banghead::banghead:

I removed the overlap for the labels, but they are the same?

I realise this is difficult to identify, but was hoping someone has experienced this anomaly before. To my mind it must be the data, but having exported the table and form to the help db, I am at a loss as to what it could be.

Can anyone help please?
 

Attachments

  • switchboard.png
    switchboard.png
    90.1 KB · Views: 103
  • Help.accdb
    Help.accdb
    884 KB · Views: 120
And now it is working again :), but I have no idea why :(
 

Users who are viewing this thread

Back
Top Bottom