Kamis, 11 Agustus 2016

Re: [MS_AccessPros] Text box and naming

 

Gary-

Let's say you have the value "txtMB10" in a string variable names strSeat.  You can refer to the control on your form that has that name by doing:

   Me(strSeat)

For example, to set the value "X" in the text box named txtMB10, you could do:

  strSeat = "txtMB10"
  Me(strSeat) = "X"

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Aug 11, 2016, at 10:35, Gary Hamon quigonn@telus.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hopefully this will make sense...

I'm working on a ticket-tracking database (Access 2007) for a local group. I have set up a grid of text boxes to match the theater layout and am trying to reflect which seats have been sold. For example, 'txtMB10' corresponds to Monday Row B Seat 10.

The table is set up with Day, Row, and Seat as separate fields. So a couple of Select statements help me put together which text box should be used for each ticket. My problem is, how do I tell Access that the string "txtMB10" corresponds with the control txtMB10?

Is there an easier way I'm not seeing?

Thanks in advance

---------------------------------------
Binary, easy as 01, 10, 11.

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar