A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Text Fields in a Parameter Query



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2004, 11:07 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

I imported a database from Excel. Have a field in a table called Bday. It's a text field (length 5). I recently added an input mask of aa/aa. I've got a parameter query to pull the birthdays during a certain time period. The birthdays that were imported without the mask require the '/' in the parameter request. Those that have been entered since don't. Any way around this?

Thanks in advance.
  #2  
Old June 15th, 2004, 01:24 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

Change the InputMask to *store* the masking character with the Field values.
You will need the "/" consistently in the Parameter value.

You *may* need to do an Update Query to insert the "/" to existing values
that don't have the "/".

--
HTH
Van T. Dinh
MVP (Access)


"Dumb Blonde" Dumb wrote in message
...
I imported a database from Excel. Have a field in a table called Bday.

It's a text field (length 5). I recently added an input mask of aa/aa.
I've got a parameter query to pull the birthdays during a certain time
period. The birthdays that were imported without the mask require the '/'
in the parameter request. Those that have been entered since don't. Any
way around this?

Thanks in advance.



  #3  
Old June 15th, 2004, 03:31 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

What's the best way to insert the "/" to the existing values? I can get to the udpate query but am unsure what to put in the update field.

"Van T. Dinh" wrote:

Change the InputMask to *store* the masking character with the Field values.
You will need the "/" consistently in the Parameter value.

You *may* need to do an Update Query to insert the "/" to existing values
that don't have the "/".

--
HTH
Van T. Dinh
MVP (Access)


"Dumb Blonde" Dumb wrote in message
...
I imported a database from Excel. Have a field in a table called Bday.

It's a text field (length 5). I recently added an input mask of aa/aa.
I've got a parameter query to pull the birthdays during a certain time
period. The birthdays that were imported without the mask require the '/'
in the parameter request. Those that have been entered since don't. Any
way around this?

Thanks in advance.




  #4  
Old June 15th, 2004, 04:37 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

How do I indicate in the update field of an update query to keep the current values but insert the / in the between the dd and the mm?

"Van T. Dinh" wrote:

Change the InputMask to *store* the masking character with the Field values.
You will need the "/" consistently in the Parameter value.

You *may* need to do an Update Query to insert the "/" to existing values
that don't have the "/".

--
HTH
Van T. Dinh
MVP (Access)


"Dumb Blonde" Dumb wrote in message
...
I imported a database from Excel. Have a field in a table called Bday.

It's a text field (length 5). I recently added an input mask of aa/aa.
I've got a parameter query to pull the birthdays during a certain time
period. The birthdays that were imported without the mask require the '/'
in the parameter request. Those that have been entered since don't. Any
way around this?

Thanks in advance.




  #5  
Old June 15th, 2004, 06:57 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

One question ---- How?

How do I "store" the masking character and what should I put in the update field (on the update query) so that it will retain the current values but put a slash between MM and DD?

"Van T. Dinh" wrote:

Change the InputMask to *store* the masking character with the Field values.
You will need the "/" consistently in the Parameter value.

You *may* need to do an Update Query to insert the "/" to existing values
that don't have the "/".

--
HTH
Van T. Dinh
MVP (Access)


"Dumb Blonde" Dumb wrote in message
...
I imported a database from Excel. Have a field in a table called Bday.

It's a text field (length 5). I recently added an input mask of aa/aa.
I've got a parameter query to pull the birthdays during a certain time
period. The birthdays that were imported without the mask require the '/'
in the parameter request. Those that have been entered since don't. Any
way around this?

Thanks in advance.




  #6  
Old June 15th, 2004, 10:09 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

I've added a ;0 to the end of my input mask and I've added a format of "aa/aa" and am still not getting anything to come up. Anything else I need to do to ensure that I'm storing the slash?

Still haven't figured out what to put in the update field for the update query.

"Van T. Dinh" wrote:

Change the InputMask to *store* the masking character with the Field values.
You will need the "/" consistently in the Parameter value.

You *may* need to do an Update Query to insert the "/" to existing values
that don't have the "/".

--
HTH
Van T. Dinh
MVP (Access)


"Dumb Blonde" Dumb wrote in message
...
I imported a database from Excel. Have a field in a table called Bday.

It's a text field (length 5). I recently added an input mask of aa/aa.
I've got a parameter query to pull the birthdays during a certain time
period. The birthdays that were imported without the mask require the '/'
in the parameter request. Those that have been entered since don't. Any
way around this?

Thanks in advance.




  #7  
Old June 16th, 2004, 03:32 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

The SQL String should be something like:

UPDATE [YourTable]
SET [YourField] = Left([YourField], 2) & "/" & Right([YourField], 2)
WHERE Len([YourField]) = 4

--
HTH
Van T. Dinh
MVP (Access)




"Dumb Blonde" wrote in message
news
I've added a ;0 to the end of my input mask and I've added a format of
"aa/aa" and am still not getting anything to come up. Anything else I need
to do to ensure that I'm storing the slash?

Still haven't figured out what to put in the update field for the update

query.



  #8  
Old June 16th, 2004, 04:07 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

Thank you thank you thank you! I'll try this.

"Van T. Dinh" wrote:

The SQL String should be something like:

UPDATE [YourTable]
SET [YourField] = Left([YourField], 2) & "/" & Right([YourField], 2)
WHERE Len([YourField]) = 4

--
HTH
Van T. Dinh
MVP (Access)




"Dumb Blonde" wrote in message
news
I've added a ;0 to the end of my input mask and I've added a format of

"aa/aa" and am still not getting anything to come up. Anything else I need
to do to ensure that I'm storing the slash?

Still haven't figured out what to put in the update field for the update

query.




  #9  
Old June 16th, 2004, 04:07 PM
Dumb Blonde
external usenet poster
 
Posts: n/a
Default Text Fields in a Parameter Query

Worked like a charm! Now I know how to use the left/right command.

"Van T. Dinh" wrote:

The SQL String should be something like:

UPDATE [YourTable]
SET [YourField] = Left([YourField], 2) & "/" & Right([YourField], 2)
WHERE Len([YourField]) = 4

--
HTH
Van T. Dinh
MVP (Access)




"Dumb Blonde" wrote in message
news
I've added a ;0 to the end of my input mask and I've added a format of

"aa/aa" and am still not getting anything to come up. Anything else I need
to do to ensure that I'm storing the slash?

Still haven't figured out what to put in the update field for the update

query.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.