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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|