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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|