Re: Pass Value from Textbox on Form to VBA Code

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Makes perfect sense!! Thanks again Chris!!!
Ryan---


--
RyGuy


"Chris O'C via AccessMonster.com" wrote:

To reference a textbox control on an open form from another form or a module,
use this syntax:

Set MyRS = MyDB.OpenRecordset(Forms!formname.textboxname)

Chris


ryguy7272 wrote:
Thank you very much Chris! This is pretty much what I was looking for. I
actually had an error at first, and realized that the "ME" keyword only works
for the "code behind forms" modules. I moved my code to the Form and it
worked great. Before this, the code was in a Module. For edification
purposes, how would I have to change the code to get the Form to reference
the code, and all related controls, in a Module?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200901/1


.



Relevant Pages

  • Re: New Table via ASP?
    ... "Kevin Spencer" wrote in message ... > Hi chris, ... > syntax for what you want, as well as other helpful Access Jet SQL syntax: ... >>> Microsoft MVP ...
    (microsoft.public.frontpage.client)
  • Re: Whats with all the Acronyms in this hobby?
    ... WTB: IJ4 slings ... shortening makes perfect sense and are really not that hard to figure ... Chris or should I have Chris ...
    (rec.games.pinball)
  • Re: How code this update query?
    ... instead of leaving it out. ... Looks like you have the syntax of UPDATE worked out. ... Use SWITCH(), instead. ... Chris O. ...
    (microsoft.public.access.queries)
  • Re: Help with intervals...
    ... >Chris wrote: ... >That's sort of what I was going to suggest as the next ... Figured my syntax was wrong, ... I'm using just regular Access SQL, ran it on both '97 and ...
    (microsoft.public.access.reports)
  • Re: CR/LF in Access Report?
    ... Chris B wrote: ... > Is it possible to force a carriage return / line feed in a text field ... > in an Access report? ... I've tried syntax like: ...
    (microsoft.public.access.reports)