Re: Need help with query linked to form.



Format() is guaranteed to create a Text field.
CVDate() might work (or even CDate() if there are no nulls.)

You generally do need to parse the dates so Access knows how to interpret them.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan" <Dan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:94F3C121-A369-45B7-BC98-B3D2DFCD9B0C@xxxxxxxxxxxxxxxx
I am doing a link table than doing a make table query to create the table
that I am querying off of for my form. So I could try to parse them out and
than re-parse them back together but was hoping there was an easier way with
fewer steps. I did try in my query to use the Format(date, yyyy-mm-dd") but
it didn't seem to make a differnce it still looked at it as a text line. I
also tried to just input Short Date under the qeury format and that didn't
work either. I have never used the CVDate() function though. What would you
suggest?


"Allen Browne" wrote:

How are you, 'pulling the table'?
Is it linked or imported?
If imported, do you use a Make Table query? An Append query? Or
TransferDatabase? Or ...?

The data type is the problem: Access is not making sense of applying the
date/time parameter to the Text field.

If you can't import it propertly, it may be possible to use a query to
generate a date/time field, using CVDate(), or Left(), Mid(), and Right() to
parse the values and DateSerial() to make a true date. Getting the data type
right in the table would be preferable though.

.



Relevant Pages

  • RE: Switch formula in query results in "Text too long to be edited."
    ... I suggest writing a function to parse the phone number field and return it in ... the desired format. ... To call a function from a query, it has to be a Public ... I need the format to be consistent ...
    (microsoft.public.access.queries)
  • Re: Parameter Query and Calculated Date Field
    ... Here is the SQL for the Query.. ... Enter End Date e.g., 9/1/2008 Short Format ... SEQ_ID1, tblREFERRAL.REFERRAL_DT, tblREFERRAL.OUTREACH_completed, CVDate( ...
    (microsoft.public.access.forms)
  • Re: Library Cache
    ... procedures that determines the SQL to be submitted based on the ... query string to parse, whereas: ... it's HOW and WHEN that replacement occurs. ...
    (comp.databases.oracle.server)
  • Re: help pulling data from a query
    ... our scanners will only scan the data not hit return so i was ... that the query just returns the scanned units. ... if the battery should be replaced again or not. ... then parse that string to find each serial number. ...
    (microsoft.public.access.forms)
  • Re: Oracle 10g and DBD::Oracle
    ... executed the following query to give me the total parse and hard parses ... before and after my query block. ... The above SQL Block creates only 1 cursor not 2. ... same sql query when I execute a SELECT statement via my small little perl script. ...
    (perl.dbi.users)