mloucel
Member
- Local time
- Yesterday, 22:57
- Joined
- Aug 5, 2020
- Messages
- 309
I have a split database [FE] and [BE]
I added a new table that contains only 1 record, ID and OfficeName
my users FIRST need to go thru a Login Screen.
I need on the Form_Load [Event] of the login screen to look for that 1 record and do something like this:
me.lblOffLocation.caption=OfficeName
or alternative:
TempVars("OfficeName").value=[OfficeName]
I try using a Dlookup:
Me.lblOfficeLocation.Caption = DLookup("OfficeLocation", "Offices", "Office_ID = " & [Office_Id]) & ""
but returns an error since of course there is no data in Office_ID, [it works if I change [Office_ID] to 1, or 2, or 3, or 4, or 5, etc.]
So how can I do it, what am I missing? I would love to put that in a TempVars location, it will make my life easier.
but how can I do it from Form_Load without no data input, just somehow open the Offices database, get that 1 record, move the OfficeName to a TempVar and use it all over the code.
Any Help will be very appreciated.
I added a new table that contains only 1 record, ID and OfficeName
my users FIRST need to go thru a Login Screen.
I need on the Form_Load [Event] of the login screen to look for that 1 record and do something like this:
me.lblOffLocation.caption=OfficeName
or alternative:
TempVars("OfficeName").value=[OfficeName]
I try using a Dlookup:
Me.lblOfficeLocation.Caption = DLookup("OfficeLocation", "Offices", "Office_ID = " & [Office_Id]) & ""
but returns an error since of course there is no data in Office_ID, [it works if I change [Office_ID] to 1, or 2, or 3, or 4, or 5, etc.]
So how can I do it, what am I missing? I would love to put that in a TempVars location, it will make my life easier.
but how can I do it from Form_Load without no data input, just somehow open the Offices database, get that 1 record, move the OfficeName to a TempVar and use it all over the code.
Any Help will be very appreciated.