Xx_TownDawg_xX
Registered User.
- Local time
- Today, 02:30
- Joined
- Jan 16, 2009
- Messages
- 78
Originally, for some stupid reason I took the easy way out and took advantage of using Access' new setTempVars feature.
BAD MOVE. It worked great, but today because of some changes to the application I am trying to add additional parameters (if you will) to the original code.
Field name is qDepartment. The event triggers on LostFocus. I used a combination of "SetTempVar" and this code:
But now.. I have more departments.. so after WADING through and updating the original code, it's being truncated now because I exceed the 255 character limit I guess?
I'm a newbie. I've got a pretty slick application, but trying to modify this and using an event procedure instead would be iffy at best. Don't get me wrong, I can write some "event procedure" VBA code, but I thought I had better leave this request up to the experts.
Would someone take pity on me?
BAD MOVE. It worked great, but today because of some changes to the application I am trying to add additional parameters (if you will) to the original code.
Field name is qDepartment. The event triggers on LostFocus. I used a combination of "SetTempVar" and this code:
Code:
deptstr, Switch([Forms]![frmMainMenu]![qDepartment]="Fabrication","[ShipFab]",[Forms]![frmMainMenu]![qDepartment]="Mirrors","[ShipMir]",[Forms]![frmMainMenu]![qDepartment]="Partitions","[ShipTPF]")
Code:
deptstr, Switch([Forms]![frmMainMenu]![qDepartment]="Fabrication","[ShipFab]",[Forms]![frmMainMenu]![qDepartment]="Mirrors","[ShipMir]",[Forms]![frmMainMenu]![qDepartment]="Partitions","[ShipTPF]",[Forms]![frmMainMenu]![qDepartment]="Hardware","[ShipHDW]",[Forms]![frmMainMenu]![qDepartment]="Accessories","[ShipACC]",[Forms]![frmMainMenu]![qDepartment]="Dryers","[ShipDRY]",[Forms]![frmMainMenu]![qDepartment]="ChildCare","[ShipCHI]",[Forms]![frmMainMenu]![qDepartment]="GrabBars","[ShipGRA]",[Forms]![frmMainMenu]![qDepartment]="SoapDispensers","[ShipSOA]")
Would someone take pity on me?