Assign a value to a Textbox

This is a discussion on Assign a value to a Textbox within the ADO DAO RDO RDS forums in Framework and Interface Programming category; Hi all I have a sub form with 3 textboxes. I also have 3 employeeID fields on the form that are set when a button is pushed eg employeeID1 = 1 employeeID2 = 5 employeeID3 = 26 These values relate to a table Customers.id so that if customer.ID = 1 then the name is Bloggs, if it is 5 then simpson etc. Is it possible to get the textbox on the subform to show Bloggs if the employeeID1 = 1 and the next textbox to show Simpson if employeeID2 = 5 etc. Thanks for the help...

Go Back   Application Development Forum > Framework and Interface Programming > ADO DAO RDO RDS

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-09-2008, 10:41 PM
Murray
Guest
 
Default Assign a value to a Textbox

Hi all
I have a sub form with 3 textboxes. I also have 3 employeeID fields on the
form that are set when a button is pushed eg
employeeID1 = 1
employeeID2 = 5
employeeID3 = 26
These values relate to a table Customers.id so that if customer.ID = 1 then
the name is Bloggs, if it is 5 then simpson etc. Is it possible to get the
textbox on the subform to show Bloggs if the employeeID1 = 1 and the next
textbox to show Simpson if employeeID2 = 5 etc.
Thanks for the help

Reply With Quote
  #2  
Old 11-10-2008, 07:03 AM
Alex Dybenko
Guest
 
Default Re: Assign a value to a Textbox

Hi,
you can use dfirst function to lookup customer name:
=DFrist("CustomerName","Customers","id=" & [employeeID1]

you can also consider to use a combobox

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"Murray" <Murray@discussions.microsoft.com> wrote in message
news:8E88CF53-8E1F-4E72-BF23-B72AA6207E16@microsoft.com...
> Hi all
> I have a sub form with 3 textboxes. I also have 3 employeeID fields on the
> form that are set when a button is pushed eg
> employeeID1 = 1
> employeeID2 = 5
> employeeID3 = 26
> These values relate to a table Customers.id so that if customer.ID = 1
> then
> the name is Bloggs, if it is 5 then simpson etc. Is it possible to get the
> textbox on the subform to show Bloggs if the employeeID1 = 1 and the next
> textbox to show Simpson if employeeID2 = 5 etc.
> Thanks for the help
>

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:53 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.