Connecting Tech Pros Worldwide Forums | Help | Site Map

Input Mask Issue

Ellen Manning
Guest
 
Posts: n/a
#1: Nov 12 '05
I've got an A2K database with a link to a table in another A2K
database. This linked table contains SSN formatted with the SSN input
mask. I'm trying to use a dlookup using this linked table. The
criteria is matching this linked SSN with an SSN that the user will
input. I have an input mask on the SSN field (on the form only) but
the dlookup is not working. I've tried the following 2 criterias:

strCriteria = conQuote & _
Mid(Me.txtSSN, 1, 3) & "-" & Mid(Me.txtSSN, 4, 2) & "-" &
Mid(Me.txtSSN, 6, 4) & conQuote


....and...

strCriteria = conQuote & Me.txtSSN & conQuote

The dlookup returns null every time. txtSSN is a bound field with no
input mask in the table....do I have to have the input mask in the
table too?

Thanks for any help or advice.

Salad
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Input Mask Issue


Ellen Manning wrote:
[color=blue]
> I've got an A2K database with a link to a table in another A2K
> database. This linked table contains SSN formatted with the SSN input
> mask. I'm trying to use a dlookup using this linked table. The
> criteria is matching this linked SSN with an SSN that the user will
> input. I have an input mask on the SSN field (on the form only) but
> the dlookup is not working. I've tried the following 2 criterias:
>
> strCriteria = conQuote & _
> Mid(Me.txtSSN, 1, 3) & "-" & Mid(Me.txtSSN, 4, 2) & "-" &
> Mid(Me.txtSSN, 6, 4) & conQuote
>
>
> ...and...
>
> strCriteria = conQuote & Me.txtSSN & conQuote
>
> The dlookup returns null every time. txtSSN is a bound field with no
> input mask in the table....do I have to have the input mask in the
> table too?
>
> Thanks for any help or advice.[/color]

Me.SSN = Dlookup("SSN","YourTableName","[SSN] = " & strCriteria)
Me.SSN = Dlookup("SSN","YourTableName","[SSN] = '" Me.txtSSN & "'")
Me.SSN = Dlookup("SSN","YourTableName","[SSN] = "" Me.txtSSN & """)

Ellen Manning
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Input Mask Issue


Oops. I forgot the "SSN = ". Thanks and Sorry...should have caught that.


Salad <oil@vinegar.com> wrote in message news:<_Hwlc.4728$Hs1.2034@newsread2.news.pas.earth link.net>...[color=blue]
> Ellen Manning wrote:
>[color=green]
> > I've got an A2K database with a link to a table in another A2K
> > database. This linked table contains SSN formatted with the SSN input
> > mask. I'm trying to use a dlookup using this linked table. The
> > criteria is matching this linked SSN with an SSN that the user will
> > input. I have an input mask on the SSN field (on the form only) but
> > the dlookup is not working. I've tried the following 2 criterias:
> >
> > strCriteria = conQuote & _
> > Mid(Me.txtSSN, 1, 3) & "-" & Mid(Me.txtSSN, 4, 2) & "-" &
> > Mid(Me.txtSSN, 6, 4) & conQuote
> >
> >
> > ...and...
> >
> > strCriteria = conQuote & Me.txtSSN & conQuote
> >
> > The dlookup returns null every time. txtSSN is a bound field with no
> > input mask in the table....do I have to have the input mask in the
> > table too?
> >
> > Thanks for any help or advice.[/color]
>
> Me.SSN = Dlookup("SSN","YourTableName","[SSN] = " & strCriteria)
> Me.SSN = Dlookup("SSN","YourTableName","[SSN] = '" Me.txtSSN & "'")
> Me.SSN = Dlookup("SSN","YourTableName","[SSN] = "" Me.txtSSN & """)[/color]
Closed Thread