Executing a Find Script with a range of dates as the criteria - date

Im trying to create a Find Script on two date selection fields (Drop Down calendars) that automatically run each time the field is updated/changed (I understand this part aka script triggers) and the report will show the results that contain dates listed between the range selected.
Please Keep in mind that I'm quite new to this so please correct me where you think I could improve is you find or see anything else that appears to be wrong. Anyways, here is the Layout for my report where the selection fields and results field are highlighted.
Here is the script code I've created and I'm trying to use.
"Pre Construction::Bid Date" ≥ "Bid Date Search::Start Date" & "Pre Construction::Bid Date" ≤ "Bid Date Search::Start Date"
Here is the error I get when I try to add/save this in/under the perform find -> specify dialog box.
Ive tried and set all the fields to use the exact same date layout and format (the xx/xx/xxxx) and ive still had no luck in created this type of search. Im hoping someone will be able to help me fix this or offer other solutions as to how I could go about creating this. Thank you all

There are two problems with your attempt:
First, you cannot use references to fields in a find request.
Next, to find records within a specified range, you must use the range operator (two or three periods).
Now, you could populate variables with the range boundaries and use these in the find request instead of the fields, but it is much more convenient to skip stored find requests altogether and do simply:
Enter Find Mode [ ]
Set Field [ Pre Construction::Bid Date; Bid Date Search::Start Date & ".." & Bid Date Search::End Date ]
Perform Find [ ]
Of course, we are assuming that the Start Date and End Date fields are global fields.

Related

Invalid Date error when entering record on Sharepoint list Datasheet view

I have a list on Sharepoint 2013. I've often use the Edit this list link to make bulk changes to the list in datasheet view with no problem. Last week I had a bunch of new records I needed to add so decided bulk copy and paste from Excel would be best. However, I get the error "Invalid date/time value. A date/time field contains invalid data. Please check the value and try again." The field is Date/Time with Date only display. The format I copied in was mm/dd/yyyy, which is how it's displayed (I realize there's a difference between formatting and display). In the past I've used this format to update dates with no problem. I've tried manually changing the date to other formats like yyyy/mm/dd (or with dashes -), and using the date picker and nothing works. I can add a new item using the form and no problem with the date. It's only happening in datasheet view.
I have 70+ records to add and would rather not have to open a new form for each one (I'm only adding info to 7 of the fields, and I first only pasted a couple records to make sure there were no issues). Are there any recent known issues about date fields in datasheet view? It's a pretty straightforward thing, no calculations are being used, I'm not trying to connect to another service, or use outlying dates (dates are all 2017) so I'm perplexed why this is an issue now and not before. Any thoughts on this would be appreciated.
Found the issue. I had another date field I was not using in that view that for some reason the default value had been set to Calculated field with a value of 1/1/1111. No idea how that got there but I removed that and set the default value to None and now the problem is gone. I found it by creating a new view with every date field in the list and systematically copying a date into each field (in bulk edit) and trying to save after each one until it saved. Then I checked the settings for the field that I was able to save with.

User-defined date range for Access query pulling outside date range

I have an Access 2007 database that requires a query be run every week to gather every record that was worked on the prior week. The current setup is:
I have a query where the date range's WHERE criteria is: Between [Forms]![frm_Menu]![txt_fromdate] And [Forms]![frm_Menu]![txt_todate]+"1"
"fromdate" and "todate" text boxes in frm_Menu are unbound text boxes. "fromdate" has an AfterUpdate event that fills in "todate" with the date chosen in "fromdate" plus 6 days.
frm_Menu has a button for running the query after "fromdate" and "todate" are filled in.
The issue is, when I run the query for a week's worth of records, I get entries outside the selected date range. For example, if I have "3/1/2015" in the "fromdate" text box and "3/7/2015" in the "todate" text box, I'll receive the results from 3/1 to 3/7, but I'm also getting results from 3/10, 3/11, and 3/12.
At first, I thought it might be reading "3/1/2015" as "3/1x/2015," but that doesn't explain why I'm ONLY getting extra results from 3/10 through 3/12 and not 3/13 through 3/19 as well.
Does anyone know what might be causing this? To work around this problem, I've just been running a query that gathers EVERYTHING and then filtering out what's need in Excel before sending it over. Ideally, I'd like for the person who needs this report to be able to open the database themselves, pick the date range they need, and then export the query results from Access.
It turned out I had the data type for the Dates column as Text instead of Date/Time. Retried the same query after changing the column to Date/Time and it worked perfectly. Just a PEBKAC error.

Excel - Insert "day" on a cell and format it to date with current month and year

I am working on a home accounting template (and could not find any good one :-/), so I am creating one for each month. Both in my expenses and my incomes, I would like to have a date column where I just have to insert the "day" (e.g.: 22) and it automatically fills the rest with the current month and year (or I could set them in another cell).
For example: 22 + ENTER would return: 22/12/2014
If I do this, I automatically get a default date: 22/01/1900
I do not know if it is possible to change this defaul date depending on the current one or any other value.
I have tried with a different strategy: if the amount column is not empty, fill in with today's date: =IF(A3="";"";TODAY())
The problem is that I do not always register today's expenses, so I need to change it manually. I was just wondering if this is possible and there is a better way (maybe a macro?).
You need Excel to modify the cell contents after you press ENTER. The only option seems to be a Macro using the Worksheet_Change event.
Please check out this other question. I think that will help.
This can be achieved with simple formatting and use of controls that are available in Excel. VBA will give you drastically more flexibility, however the request above can be accomplished without learning VBA.
I have included a sample file here.
Steps to recreate:
Create a range of months. I created a range including the current month through 12/2014
Insert a combo box from the developer tab. Right click and select Format Control. On the Control tab, input the range you just created and then select a "linked cell". This will insert an integer to indicate which item you picked in the list, starting at 1.
Use the attached formula to add the DAY that you enter in the first column and VLOOKUP the month and year from the value chosen in the combo box.
Enhancements: I used conditional formatting to change the text color of the days you enter to WHITE. This way you won't see them. I also included some checking in the VLOOKUP formula: the day you enter must be a number and must be non-blank for a date to populate.

Drupal 7: Filter view if date field has end date

I have the following situation in Drupal 7: I have a content type "documents" which contains a field validity which is a Date field that is mandatory. It may contain an end date, but it also may not. (Single Date field that allows setting an end date.)
The meaning of this field is that if the end date is set, the document is valid only until this end date (which may be in the past or the future). If there is no end date set, the document is valid until further notice.
Now I want to create a view that filters all documents which are still valid. So the first filter I create is that the field_validity value is in the past. Now I need a filter that checks if either the end date is not set or is in the future. But in the database, the end date is set to the same date as the starting date, when it is not selected in the specific entity.
Any ideas how I can archive this?
Regards,
Christoph
Have you tried a PHP views filter? https://drupal.org/project/views_php
It allows you to create a Views filter which executes custom PHP code, so you can have full control over your condition.
The module only exists in a DEV version, but is widely used with 38,000 active installations.
Otherwise, if I understand correctly, you only want to show documents that are between field_validity and end date.
One option would be to problematically set your end date to something obscene (100 years later), if the value is blank. This way your view will be simple to create.

In Microsoft Access, How do I link textboxes on the main form to be the query parameters?

I've done a lot of research on this subject and every answer I find deals with eliminating the parameters and using VBA to apply the filters. However, my query is the result of many subqueries and the parameters are created and used right from the beginning so I don't think that's a viable option. This thread is very similar to my problem, the difference being that the person who asked the question can apply the filter to their dates at the end. I'm preferably looking for a way to literally sub my unbound textbox values on the main form as the parameters for the query since this seems like it would be much more straightforward than trying to find a workaround like I have been trying up to this point.
Quick description of my queries if it helps: My first subquery consists of dates, names, rates and dollar amounts. The user is asked for two parameters, a [start date] and an [end date]. The final query produces each distinct name, a matching rate and a sum of the dollar amounts for that name between the two dates. The matching rate used is the rate for that specific name where the date is the same as the [end date]. If the combination of the name and that [end date] doesn't exist, the rate used is 0. The intermediate subqueries consist of doing the calculations and finding which rate is used.
I'd appreciate any kind of help with this problem!
Change the parameters in your query into references to the combo boxes in the frmMain, and add some code to requery the subform whenever the combo box changes, or whenever the user clicks on "Filter" button.
I think you may wish to replace the [start date] and [end date] parameters with :
= Forms!MyForm!MyStartDate
And
= Forms!MyForm!MyEndDate
Where MyForm is an open form with two textboxes.
If you have a crosstab in there somewhere, you will also need to add a parameter line.