A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Referencing Text Boxes on forms



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2004, 08:51 AM
Conor Grogan
external usenet poster
 
Posts: n/a
Default Referencing Text Boxes on forms

I have a button on a form, when pressed it generates an event. Whe the event is triggered, I would like to use a variable, that the user enters into a text box on the same form, to query a database. How do I do I reference the text box?
If you have time it would be handy to have an example VB code that generates an SQL statement.
  #2  
Old April 28th, 2004, 04:46 PM
fredg
external usenet poster
 
Posts: n/a
Default Referencing Text Boxes on forms

On Wed, 28 Apr 2004 00:51:03 -0700, Conor Grogan wrote:

I have a button on a form, when pressed it generates an event. Whe the event is triggered, I would like to use a variable, that the user enters into a text box on the same form, to query a database. How do I do I reference the text box?
If you have time it would be handy to have an example VB code that generates an SQL statement.


In the query, as criteria, use the following syntax:

forms!NameOfForm!ControlName

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.