From: JMD.Park on
I am new to this. What is Address?

"fredg" wrote:

> On Fri, 12 Mar 2010 08:51:02 -0800, JMD.Park wrote:
>
> > I would like to create a look up for a field in a form. I would like to put
> > in a customer number that will bring up their name and address info. How can
> > I do this? Thanks in advance for your assistance.
>
> It depends.
> If The [CustomerNumber] field's datatype is a number, then:
> =DLookUp("[Address]","TableName","[CustomerNumber] = " &
> Me.[CustomerNumber])
>
> However, if the [CustomerNumber] field is a Text datatype, then:
>
> =DLookUp("[Address]","TableName","[CustomerNumber] = '" &
> Me.[CustomerNumber] & "'")
>
> Do the same for the Customer's Name field.
>
> Change CustomerNumber to whatever the actual field name is.
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
> .
>
From: JMD.Park on
I will try to explain myself better:
I would like this "Customer"=number in Form 1 called "Distribution" to bring
up these fields from "Historical" table that is linked by the way. The
following fields are for me to verify that I have the correct customer
number. The fields are all text and are as follows: MailingAddress1, Mailing
Address2, MailingCity, MailingState, MailingZip, and Phone. I tried this:
=DLookUp("[Distribution]","Historical","[CustomerNumber] = "
&Me.[CustomerNumber])
I receive an error.


"JMD.Park" wrote:

> I am new to this. What is Address?
>
> "fredg" wrote:
>
> > On Fri, 12 Mar 2010 08:51:02 -0800, JMD.Park wrote:
> >
> > > I would like to create a look up for a field in a form. I would like to put
> > > in a customer number that will bring up their name and address info. How can
> > > I do this? Thanks in advance for your assistance.
> >
> > It depends.
> > If The [CustomerNumber] field's datatype is a number, then:
> > =DLookUp("[Address]","TableName","[CustomerNumber] = " &
> > Me.[CustomerNumber])
> >
> > However, if the [CustomerNumber] field is a Text datatype, then:
> >
> > =DLookUp("[Address]","TableName","[CustomerNumber] = '" &
> > Me.[CustomerNumber] & "'")
> >
> > Do the same for the Customer's Name field.
> >
> > Change CustomerNumber to whatever the actual field name is.
> > --
> > Fred
> > Please respond only to this newsgroup.
> > I do not reply to personal e-mail
> > .
> >
From: JMD.Park on
Also, is there a specific class I can take that covers these types of
questions?

"fredg" wrote:

> On Fri, 12 Mar 2010 08:51:02 -0800, JMD.Park wrote:
>
> > I would like to create a look up for a field in a form. I would like to put
> > in a customer number that will bring up their name and address info. How can
> > I do this? Thanks in advance for your assistance.
>
> It depends.
> If The [CustomerNumber] field's datatype is a number, then:
> =DLookUp("[Address]","TableName","[CustomerNumber] = " &
> Me.[CustomerNumber])
>
> However, if the [CustomerNumber] field is a Text datatype, then:
>
> =DLookUp("[Address]","TableName","[CustomerNumber] = '" &
> Me.[CustomerNumber] & "'")
>
> Do the same for the Customer's Name field.
>
> Change CustomerNumber to whatever the actual field name is.
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
> .
>
From: JMD.Park on
Forgot to include BusinessName is text as well.

"JMD.Park" wrote:

> I will try to explain myself better:
> I would like this "Customer"=number in Form 1 called "Distribution" to bring
> up these fields from "Historical" table that is linked by the way. The
> following fields are for me to verify that I have the correct customer
> number. The fields are all text and are as follows: MailingAddress1, Mailing
> Address2, MailingCity, MailingState, MailingZip, and Phone. I tried this:
> =DLookUp("[Distribution]","Historical","[CustomerNumber] = "
> &Me.[CustomerNumber])
> I receive an error.
>
>
> "JMD.Park" wrote:
>
> > I am new to this. What is Address?
> >
> > "fredg" wrote:
> >
> > > On Fri, 12 Mar 2010 08:51:02 -0800, JMD.Park wrote:
> > >
> > > > I would like to create a look up for a field in a form. I would like to put
> > > > in a customer number that will bring up their name and address info. How can
> > > > I do this? Thanks in advance for your assistance.
> > >
> > > It depends.
> > > If The [CustomerNumber] field's datatype is a number, then:
> > > =DLookUp("[Address]","TableName","[CustomerNumber] = " &
> > > Me.[CustomerNumber])
> > >
> > > However, if the [CustomerNumber] field is a Text datatype, then:
> > >
> > > =DLookUp("[Address]","TableName","[CustomerNumber] = '" &
> > > Me.[CustomerNumber] & "'")
> > >
> > > Do the same for the Customer's Name field.
> > >
> > > Change CustomerNumber to whatever the actual field name is.
> > > --
> > > Fred
> > > Please respond only to this newsgroup.
> > > I do not reply to personal e-mail
> > > .
> > >
From: JMD.Park on
Lets try this again. I am trying to use DLookup to bring up several fields
from a table into a form. Can someone please let me know if this is possible
and tell me how to do this? I am new to expression builder so please be
patient with me and specific as well as where to build.
I would like this "CustomerName" that is a number field in Form called
"Distribution" to bring up these fields from "Historical" table that is
linked by the way. The following fields are for me to verify that I have the
correct customer
number. The fields are all text and are fields of there own in the form.
They are as follows: BusinessName ,MailingAddress1, Mailing
Address2, MailingCity, MailingState, MailingZip, and Phone. I tried this:
=DLookUp("[Distribution]","Historical","[CustomerNumber] = "
&Me.[CustomerNumber])
I receive an error. I have also tried the wand. It does not bring up the
correct customer with number and only brings up several fields that are not
placed in the forms table.


"John W. Vinson" wrote:

> On Fri, 12 Mar 2010 08:51:02 -0800, JMD.Park
> <JMDPark(a)discussions.microsoft.com> wrote:
>
> >I would like to create a look up for a field in a form. I would like to put
> >in a customer number that will bring up their name and address info. How can
> >I do this? Thanks in advance for your assistance.
>
> Open the Toolbox; select the magic wand icon. Then select the Combo Box tool
> and put a combo box on the form. Use the wizard option "use this combo to find
> a record".
> --
>
> John W. Vinson [MVP]
> .
>