Formating Date Field In Query Grid
Nov 13, 2007Hey.
How do I format Date field in query grid to make field into "11/11/2007" if the data originally has time, or in form "11 Nov, 2007" ?
Hey.
How do I format Date field in query grid to make field into "11/11/2007" if the data originally has time, or in form "11 Nov, 2007" ?
I have the following field which is stored as a string: [field3]"2006090111123500"
the first 8 characters represent the date but backwards.
I want to filter between dates.
I have the following in the query grid:
CallDate: DateValue(Right(Left([Field3],8),2) & "/" & Mid(Left([Field3],8),5,2) & "/" & Left([Field3],4))
with criteria: >=#01/10/2006# And <=#31/10/2006#
This seems to work on october data no problem
I had hoped to put all the september data into the same data table and filter but it failed so I created a new table called september data and pointed the query to it but for september:
with criteria: >=#01/09/2006# And <=#30/09/2006#
however the query fails if I take out the calldate expression it works no problem.
In fact it works providing I dont try and filter on date or sort by ascending.
it says data type mismatch in criteria expression. I had hoped that datevalue would turn the string into a date.
Its strange that it works in one query and not in the other with only the data being different.
Can anyone see why this should fail have I done something stupid?
kind regards in advance.
peter
hello
i am using a 2 tables where in one table my startdate format is general.
where as in another table date format is shortdate
now i want to compare 2 dates in select query
my query is
rsBreakDown.Open "select Breakdown.*,EquipmentMaster.McName from BreakDown inner join EquipmentMaster on reakdown.McNo=EquipmentMaster.McNo where startdate <=#" & dtpshow.value", conn, adOpenKeyset, adLockOptimistic
here startdate is in general format n dtpshow is in shortdate format
i want to compare these 2 dates
how can i?
is anybody help me?
Hi...I am new to access...not sure if we can do that...
is there any way we can enter the date in access this way..
if we enter 01012004..the slash is added automatically..i.e the date becomes 01/01/2004.
It would be great if anyone could help me out..
Regards
Rahul
Hi,
I am having trouble with the format of dates comming from access, if I view a table in access with a field of Date/Time the date is formatted correctly as dd/mm/yyyy, but when I retreve the date from my ASP page the format changed to mm/dd/yyyy. I can successfully change the format using a date format function but is there a way of getting access to send the date in the correct format in the first place or know why it's doing this. I am using access 2003 and the following connection string
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:webSites estWebdataBasefcd_db_080306. mdb"
Thanks for any help and guidance you can give
Joolz
Hi helpers,
I need to have a specialized field for my voucher's local date which is totaly based on different calendar and formats with the system's. (English)
So I created a feild in my table, as text data, and gave it a YYYY/MM/DD input mask in forms, but this field in many places like combo boxes, and reports controls is shown as a number, such as 31940. pls note that there is no similar calendar format in Windows system for my purpose.
How can I avoid this, I mean I need this text (my local calendar date) to be shown as it is and entered. I dont need this feild for calculations, so text is appropriate.
thanks in advance.
I am new to Access and I have just imported my old ham radio logs from a DOS based Smart database - rememeber that one.
I have created a reasonable functioning table. I have also created a Query to sort certain records for which I want to print labels to affix to my radio card which I wish to send to other radio stations (called QSL cards). I have created a Report to run the Query and to print a label. Here is my label. It is a mixture of text strings and data from my log database Query.
To Radio 9U9Z QSL QSO
dd/mm/yy UTC Freq Mode RST
24-Feb-07 18:44:00 18.148 ssb 55
73's de Mark N1XX (WAB 11XXX)
Here is the code for the date time etc line - the 3rd line down on the label above - taken from the design view
=Trim([Date] & " " & [Time_UTC] & " " & [Frequency] & " " & [Mode] & " " & [Rpt_Sent])
I am not sure how to format the date to print just the hours and minutes. I would have hoped that since the main log table was using a short time that it would have folowed automatically. In fact the time was printing as 12 hour time and I had to go into my Windows XP preferences and change the pc to a 24 hr clock to get it to print as a 24 hour clock. I tried setting the pc to an hrs and minutes time but it didn't fix my label format. It still shows seconds. I would like to get label to print 24hr hours and minutes and be able to set my pc back to a 12 hour clock format.
Thanks for your help. I still have loads to learn with this database program.
thanks Mark
I am a beginner with aggregate functions.
I have two tables, one describing parts, and one describing assemblies that use those parts:
tblParts show all the part descriptions, including fldPartNumber.
tlbWhereUsed shows zero or more fldAssemblyNumber records for each fldPartNumber.
I want a query that shows, for each record of tblParts, the number of assemblies that use that part. I specifically want to do this with an aggregate function:
DCount("*","tlbWhereUsed ","[tlbWhereUsed].[fldPartNumber]=[tblParts].[fldPartNumber]")
but I don't know where to put this function call in the query grid.
(I do not want to do this in VBA, if I don't need to).
Thanks in advance...
trying to add 2 fields
=[field1] + [field2]
works but I want a space between the 2
how do you do that?
jon
Hi everyone;
I am using Access 2003 with Windows XP Pro. I have a problem with using a query and the dreaded UK Postcodes!
I have a Client table that contains a field “Client Postcode 1”, in which is entered the first part of the UK postcode i.e. AB11, WC1A, E1, EC2V, etc.
In a Candidate table here are many text fields where we enter which postcode a Candidate wants to work in, i.e. TN, CV4, EC, W, etc.
We have a separate Candidate Search form where we select a particular client (Combo box from the Client table) which then displays the Client’s Postcode 1 data i.e. the first part of the UK postcode before the space.
We have a select query that then tries to match the Client Postcode 1 with the postcode that the Candidate wants to work in from the Candidate’s table.
In this query design grid I have successfully created criteria that will match the Client Postcode 1 field to the Candidate’s postcode field – very straightforward. This, for example, will match a Client with a TN39 postcode with a Candidate who wants to work in the TN39 postcode.
In the same query design grid I have also been able to successfully match the Client Postcode 1 field to a Candidate’s Postcode field using just the first 2 letters (using Left). This matches a Candidate who wants to work anywhere in the TN postcode area (TN1, TN2 etc.) with a Client whose postcode starts with TN
However, what is stumping me is where a Client’s Post code has only 1 letter followed by numbers (E1, B2 etc) in the first part of their postcode without returning EX, BL etc. I would like the accumulated wisdom on this forum to point me in the right direction to design criteria to input into the query design grid that will match ONLY the first letter of the postcode IF the second character is a number.
Regards to all - and what an excellent site!
I have a query that runs to check if a form has any empty delay hrs.
Code:
SELECT [Tble-wcDelays].ID1, [Tble-wcDelays].LinkingID, [Tble-wcDelays].HoursDelay, [Tble-wcDelays].ReasonDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].ID1, [Tble-wcDelays].LinkingID, [Tble-wcDelays].HoursDelay, [Tble-wcDelays].ReasonDelay
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-RPC]![wetcleanID]) AND (([Tble-wcDelays].HoursDelay) Is Null)) OR ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-RPG]![wetcleanID]) AND (([Tble-wcDelays].HoursDelay) Is Null));
I'm trying to avoid cerating multiple queries that dothe same thing. But if this qurey runs from the form "FRM-RPG" then It errors because it can't find "FRM-RPC" so why does it not over look that frm and go to the 2nd Frm ?
HI
I am working on a database that holds communications from treatment episodes.
the sub form holds the communications related to that client and that treatment episode.
when you enter a date into the communication record a mesage box asks if this is a new treatment episode and if yes opens a new treatment record. If it is the same treatment episode it just remind you that you are in the same treatment episode.
what i would like to do as an additional cue to the user is that once a client has been discharged from the episode that all communication records change color.
I can get the field that says dc to change color but I want all the fields in all the records from that episode to change color.
any ideas?
thanks
Hi all,
I have a query that I have an expression in that is returning a text value instead of a number value. The field in my table is a number value but when I use the expression it returns it as text. I have done several searched but can't seem to find anything that matches formatting an expression as a number. Here is the expression I am using, the reason I am using it is because I need to return a zero if no records matched the criteria.
total: Nz(Sum([act_hours]),0)
Thanks
Dear All,
I really need your help my problem is
i had data such table FPMas
NoseriItem Date Amount
01 1/1/2005 200
02 1/1/2005 100
03 2/2/2005 300
04 2/2/2005 100
when i using query to count and grouping by Bulan.
SELECT Count(FPMas.NoseriItem) AS CountOfNoseriItem, Month([Date]) AS Bulan, Year([Date]) AS Tahun, Sum(FPMas.Amount) AS SumOfAmount,
FROM FPMas
WHERE ((FPMas.Date)<[BlnSetor]))
GROUP BY Month([Date]), Year([Date]),
HAVING (((FPMas.Date)=[Forms]![SPM_Frm]![Bulan]));
The Query got data
CountofNoseriItem Bulan SumOfAmount
2 1 300
2 2 400
Now the problem is when i put the field Bulan in to Report and i want to Change the format of Bulan to "mmmm" to display goes wrong value it's change to December 19080 it's should be January and Febuary. I'thing the problem is the value got by the Month([Bulan]) is a number not date format where it's should.
How to Change the value when month([Bulan]) got into date time format? or any body have another way?
Thank's for any help.
From
H3ndr@
I have a date and time stamp in a Date/Time field of General Date format (3/1/2006 7:52:25 AM).
I wish to select query on the table's Date/Time field by date portion only (3/1/2006) and not include the time portion (7:52:25 AM) of the field.
Using this expression in the query's criteria - "Between [Enter Start Date: (MM/DD/YY Format)] And [End Date: (MM/DD/YY]" will not return the date ranges as desired without also typing in the full time string.
How can the date integer be parsed out and the query properly expression ed on the criteria field without using VB?
I have a query based on a table which has a date field. the field both in the table and the query have the time also in the date value so when I try to query on a date I get nothing if I copy the date and time from the field I will get the result for that record if I just use the date I get nothing. I have tried the format which does display just date but if you click on the field the time is also there You must be able to query for a date only and get all the records.
View 11 Replies View RelatedI would like to seek guidance again on my new project, I wanted to create a data entry form that the user can input records using my unbound label boxes, then upon hitting an add button it will go automatically on a subform below or a GRID so that the user can see all the records at a glance.
View 2 Replies View RelatedI have Grid X and Grid Y set at 24. Usually I see dots all over my forms.... which allows me to snap controls to the grid. Today I only see large boxes instead?
Did I change some setting?
Thanks
Hi all,
Can I add a flex grid control on a MS ACCESS form.
IF yes, does MS access 2003 has a flex grid control, i cant find one in the toolbox.
MAy I know where can i find the control?
Thanks
Hi,
In my first steps working with Access I feel unable to find out how can I create a report that shows the data (records from a Clients Table - Name, Phone, e-mail fields-) in a "spreadsheet like" format with gridlines. Can anyone help me on this?
Thanks
I have a orders sub form that was working great .Then all of asudden when i when to input information into the fields i realised the grid under variuos field names has disappered (Icant enter any info),surly this must be something i have accidentally done without realizing.
View 13 Replies View RelatedI am writing a database to track our (and others) wine collections. i'm wanting to track what bottle is where. so i can look up what i have, look up where i have put it and away i go to get it, simple right?
just to complicate things i want a system in place. where the end user and use forms to add/remove or modify wine racks.
assuming that all racks are rectangular i would like to be able to add a rack and call it rack 1. rack 1 has 4 shelves all able to hold 5 bottles. the database would then say that bottle X is in rack 1 shelf 1 position 1.
if possible there will aslo be a screen that is auto generated by the database showing a simple grid with grrn and red squares denoting if the position if full or empty. the ability to click on a position to see what is in there or to add a bottle there would be amasing but not fussed if that can't be done.
I have a search page and would like to display the search results in a grid/table format. User will be able to select a row to go to a detail screen. What is the best component type to use for this?
View 1 Replies View RelatedI am using Access 2003. Is there any way to put grid lines among fieldnames and contents just like in Excel in the output of subreport?
View 1 Replies View RelatedI am struggling with a slight form delay. When it opens on the OnOpen event, i am populating a grid. This takes about 3 to 5 seconds but, the it also takes the form the same time to open. What i need to do is get the form to open then populate the grid. Can i make the form open first then populate?
View 4 Replies View RelatedHello everyone.
I have a multi user database that is used across 2 sites. In one of the sites the regional settings for 'short date format' is set to dd/mm/yy - the other site its set to dd/mm/yyyy. All the data that its the tables are set to dd/mm/yy. When the second site try to use the reports and queries they permanently error due to the fact that the date look up box is setting its self to dd/mm/yyyy as per its short date format. The IT manager there refuses to change this as its - and I quote 'its not y2k compliant !!!! :mad: :eek: :confused: - anyway. I cant change the data in the table to yyyy as its a text feed and Im not in control of that.
I planned on using a hidden text box to format the date to dd/mm/yy and hence bypass the regional settings, but this queries arent recognising the new foramt and are returning null and blank tables. Im now completely lost and stuck. Can anyone help ??