By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,241 Members | 775 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,241 IT Pros & Developers. It's quick & easy.

Input Mask Issue

P: n/a
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.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ellen Manning wrote:
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.


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

Nov 12 '05 #2

P: n/a
Oops. I forgot the "SSN = ". Thanks and Sorry...should have caught that.
Salad <oi*@vinegar.com> wrote in message news:<_H*****************@newsread2.news.pas.earth link.net>...
Ellen Manning wrote:
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.


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

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.