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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ME statment HElp



 
 
Thread Tools Display Modes
  #1  
Old June 9th, 2004, 10:49 PM
external usenet poster
 
Posts: n/a
Default ME statment HElp

Hi
I hope I can explain this all ok

I have on a form "frmCustomers" a command button on the [event procedure]
I have
Dim x
x = fHandleFile("mailto:" & Me!ContactEMail, WIN_NORMAL)

The record source on the form comes from a table called Customers
Which works fine

BUT what I want to do is make another form where the record source comes from a table
callled tblEmail

So if I make a command button with the [event procedure]

Dim x
x = fHandleFile("mailto:" & Me!ContactEMail, WIN_NORMAL)


IT will go and look in the table "Customers" for some reason

What I want is

go and look in the "tblEmail table and get the info from the "ContactEMail" field


How do I alter this please

As always, any and all help is greatly appreciated.

Thank you in advance.

John
  #2  
Old June 10th, 2004, 07:55 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default ME statment HElp

John,

The Me! keyword can be thought of a short for "This Form" in a form's
module. Your code does not look up the mail address in any table, it picks
it up form the curent value of the ContactEMail control on your form. So, to
pick up a mail address from a different table using the same code structure,
you would need to have the form's rowsource be (or contain) the other table,
and the control's source be the particular field. Alternatively, if the two
tables are joint on a Contact_ID field, for instance, you could leace your
form as is, and use the Contact_ID control on your form to DLookup the mail
address from the other table in your code.

HTH,
Nikos


wrote in message
...
Hi
I hope I can explain this all ok

I have on a form "frmCustomers" a command button on the [event procedure]
I have
Dim x
x = fHandleFile("mailto:" & Me!ContactEMail, WIN_NORMAL)

The record source on the form comes from a table called Customers
Which works fine

BUT what I want to do is make another form where the record source comes

from a table
callled tblEmail

So if I make a command button with the [event procedure]

Dim x
x = fHandleFile("mailto:" & Me!ContactEMail, WIN_NORMAL)


IT will go and look in the table "Customers" for some reason

What I want is

go and look in the "tblEmail table and get the info from the

"ContactEMail" field


How do I alter this please

As always, any and all help is greatly appreciated.

Thank you in advance.

John



 




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 10:41 AM.


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