Re: Refer to itself



Thanks!
John

"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> schreef in bericht
news:46ffc765$0$3609$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Unfortunately, Access does not expose the name of the control the event is
for, or the name of the executing event.

If the user typed into the control, it will be:
Me.ActiveControl

That may not be the case if the event procedure is executing because you
called it like this:
Call Text0_BeforeUpdate(False)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"john" <hgf@xxxxxxxxxx> wrote in message
news:b7853$46ffc5d7$5354c91b$31151@xxxxxxxxxxxxxxxxxxxxxxxxxx
I have a bound textfield in my form. In the beforeupdate event of that
field I want to refer to that field's value. What's the easiest way to
refer to that field's value?

st = MyFieldName works but I'd rather refer in a more generic way like
st = Me (which doesn't work).

Thanks,
john



.



Relevant Pages

  • Re: Refer to itself
    ... Unfortunately, Access does not expose the name of the control the event is for, or the name of the executing event. ... What's the easiest way to refer to that field's value? ...
    (comp.databases.ms-access)
  • Re: Me. vs Me!
    ... syntax may only be used in a class module (which I don't believe ... you can use Me.controlname or Me!controlname to refer ... running behind FormA you can refer to control txtFieldOnA on FormA using ...
    (microsoft.public.access.modulesdaovba)
  • Re: forms and variables help please
    ... To refer to a control on the New form where the control name is a variable, ... Doug Steele, Microsoft Access MVP ... On stepping through my code i know that the name of the textbox is being ...
    (microsoft.public.access.formscoding)
  • RE: Why cant I open a report using VB?
    ... you now have no criteria in the query that refers ... is to check that the control that you refer to to populate the variable ... The query used to refer to "Forms!frmDrive!TestID", ... It works when I call the report straight from the database window ...
    (microsoft.public.access.modulesdaovba)
  • Re: Problem mit Zugriff auf Listbox
    ... > funktioniert das Weglassen der Form-Eigenschaft erst seit A95. ... | ' Refer to a NewData control by using the subform Controls collection. ...
    (microsoft.public.de.access)