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
|
|||
|
|||
use vba to find a record on my form searching all phone fields in
Hi,
I Am Trying to search a table that has three phone fields, I want to have the user type in one phone number and be able to select it and have access put that record on my form. Can you help me ? Thanks in Advance |
#2
|
|||
|
|||
use vba to find a record on my form searching all phone fields in
On Mon, 13 Feb 2006 21:07:27 -0800, "jjbra"
wrote: Hi, I Am Trying to search a table that has three phone fields, I want to have the user type in one phone number and be able to select it and have access put that record on my form. Can you help me ? Thanks in Advance You don't really need much (or any!) VBA to do this. Put an unbound textbox named txtFindPhone on your Form. Create a Query based on your table. Put [Forms]![YourFormName]![txtFindPhone] on the Criteria line under HomePhone, WorkPhone, CellPhone (or whatever the fields are), on three separate lines - so it will use OR logic to find it in any one of the fields; and include all the other fields you want to see in the query. The one snippet of VBA would be in txtFindPhone's AfterUpdate event: Private Sub txtFindPhone_AfterUpdate() Me.Recordsource = "YourQueryName" End Sub John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Navigation buttons | Dorothy | Using Forms | 10 | August 1st, 2007 08:58 PM |
Move feild entries from form to form using global variables | JackCGW | General Discussion | 11 | November 14th, 2005 05:22 AM |
Combo Box NotInList - How To Add Data To Underlying Table | 10SNUT | Using Forms | 19 | July 8th, 2005 09:12 PM |
Access Mail Merge to Word.doc files ? | RNUSZ@OKDPS | Setting Up & Running Reports | 1 | May 18th, 2005 06:31 PM |
Form Doesn't Go To New Record | Steve | New Users | 15 | May 16th, 2004 04:33 PM |