473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

unbound date field on a form

I am trying to do what I thought was a very simple thing. I have
created a form with a few unbound text fields. I want to pull these
values into a query where some calculations will be done to them.

This seems to work fine until I set the Format property of the text box
to anything other than blank.

The syntax that I am using for the query is:

TopDate: [forms]![frmEdit]![text6]

If I leave the format property blank, this works ok. As soon as I make
it anything other than blank (E.g. "Short Date"), I get nothing in the
query.

Yes, the form is open.
Yes, the fields are spelled correctly (it works when the format is
blank).
Yes, the form has been saved.
No, there aren't any error messages.
No, it does not work with any other format types (Standard, Long Date,
Short Date, etc.)

Any suggestions? I am banging my head against the wall on this one as
I though it would be simple!
Thanks for any help in advance!

Alex Brewer.

Nov 13 '05 #1
1 4166
The symptoms you describe would suggest that Access is having a problem
understanding the data types correctly.

When you view the query results, does Access display the TopDate field
left-aligned (indicating it is Text) or right-aligned (correct for dates and
numbers)? Try explicitly typecasting your query field as a date, i.e.:
TopDate: CVDate([forms]![frmEdit]![text6])

As a general guide, you might benefit from:
Calculated fields misinterpreted
at:
http://members.iinet.net.au/~allenbrowne/ser-45.html

If you date format is different from the US, see:
International Date Formats in Access
at:
http://members.iinet.net.au/~allenbrowne/ser-36.html

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

"Alex" <al*********@rocketmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I am trying to do what I thought was a very simple thing. I have
created a form with a few unbound text fields. I want to pull these
values into a query where some calculations will be done to them.

This seems to work fine until I set the Format property of the text box
to anything other than blank.

The syntax that I am using for the query is:

TopDate: [forms]![frmEdit]![text6]

If I leave the format property blank, this works ok. As soon as I make
it anything other than blank (E.g. "Short Date"), I get nothing in the
query.

Yes, the form is open.
Yes, the fields are spelled correctly (it works when the format is
blank).
Yes, the form has been saved.
No, there aren't any error messages.
No, it does not work with any other format types (Standard, Long Date,
Short Date, etc.)

Any suggestions? I am banging my head against the wall on this one as
I though it would be simple!
Thanks for any help in advance!

Alex Brewer.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
4
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I...
3
by: Dos Lil | last post by:
I have a unbound field in the subform(for calculating the datediff) which has the control property ==DateDiff("n",,). I have another unbound field in the main form which is for displaying the...
3
by: Pat | last post by:
Hello, I've used Sum() to total bound fields on a continuous form with no problem. However, I now have a continuous form, on which I use an unbound field to calculate the number of hours between...
5
by: David | last post by:
Hi I seem to be getting nowhere with this. I am opening a form which will be used to input Notes into different fields in a table. My problem is changing the unbound field name to the field name...
6
by: jean.ulrich | last post by:
Hi I have a form that is not related with a table neither a query (unbound form) On this form I have a text field where the user can put a text or a number As I dont want to create a table...
5
by: isoquin | last post by:
I am designing a form with subform. One of the subform items needs to be separated from all the rest (purely for look, unfortunately), and so I have an unbound field (Date) in the form itself. ...
1
by: cdhaynes | last post by:
Hi, I am using unbound text boxes in the header of a form to allow the user to search on a number of fields. I am using VBA to build a query string based on these and it has been fine when comparing...
4
by: dizzydangler | last post by:
Hi all, I am a new Access user and just starting to get my head around some of the basic concepts, so please take it easy on me :) My company has been managing client records on excel, and I’m in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.