I have a date field (WhitesDue) that I want automatically filled in when information in another field (Conditions) in another table is entered. The field Conditions is a number field and depending on the number of conditions determines when the whites are due.
I saw the other thread, Automatic Date Function, and was wondering if it was possible to put an if then code in to have the date updated with different dates depending on the number of conditions and the date that the information is put in. For example if someone is putting information in today and they have 4 conditions then I want the date to be automatically filled in with 8/17/04 (is it possible to factor weekends in too?).
Does that make sense? Can anyone help me out here?
Okay I stepped through some code that I have in the Conditions after update event. It works, it puts the date in the code like it is supposed to. Now, how do I get it to put the date into a field on another form?
If [Conditions] > 3 And [Conditions] < 5 Then
[Whites] = Now + 2
ElseIf [Conditions] > 5 Then
[Whites] = Now + 4
Else
[Whites] = Now + 1
End If
i need to run a specific qry that runs from 5th to 5th of every month to show payments made between the dates. i dont want to fill anything in as these dates are set. can a qry be made to run and retrive the info between 5th of last month & 5th of current month automatically ( by the press of a button ) every month?
This is going to be a dumb question for all you Access experts, but how do I insert a field that will automatically display the date that the record was created (not updated, but created)?
This is going to be a dumb question for all you Access experts, but how do I insert a field that will automatically display the date that the record was created (not updated, but created)?
I am trying to create a function whereby when I update a memo field or a field where I put in notes, after I am done, it will automatically put in the current date.
I am putting this form together that involves the user to enter in the current date 2/20/2007 in that format. Is there a script or something i can do in access that will autmatically put the current date in the date field and just update the date as each day changes everyday?
OK, next question. I have a query for my database that asks for all records reviewed on a particular date. I've got it set up so that when I run the query, it will ask me for a date range and then run the query only bringing up the records that meet the date range criteria. I then developed a report from this query and it too asks for a date range when I run the report. My question is this: I hit the button to run my report, the box asks me for a beginning date and then a ending date. I enter the date range and the report runs great. Is there a way that after I put in the date range, that date range will show on my report? Thanks once again for your help.
Example:
NAME OF REPORT 1/12/07 - 1/20/07 (this is the date range I entered)
I've got a form that writes to a database for news articles.
Is it possible to set up Access so it automatilcally inserts the date of when the article was added to the database??? Ideally in the dd/mm/yyyy format.
This might be basic stuff to the more advanced user but its all new to me :)
Hi, Probably this question has been asked before, but I'm new here. Don't know if the question should be asked here and hope that my English is good enough.
I have a database in which I change the content of the records on a regular base. There are two dates in it. One is the day I made/added a new record, one should be the date I made the last change, but I can't get it to work. I have been searching the Help-option in Access as well as Google to find an answer, but so far no results. I don't know anything about Visual Basic, so if you answer please keep it simple.:o
I have a query that allows the user to see how many hours we've flown, sorted by month for the current year.
Problem is that in the query I have to manually put in the criteria "january 2007" or "february 2007" or etc....
What I would like it to be able to do is based on the current year (2007 for instance) set the criteria by itself. Someday I might not be around to reset the year in the criteria so therefore it should be automated.
Anybody have an idea what I'm talking about and a simple solution a hack of a programmer could figure out?
Is there any way I can add the date to come up automatically (i.e. today's date) on a field called 'order date' on my orders form. I currently have an input mask on this table field (i.e. dd/mm/yyyy) if this is any help/hiderance?
I have a quick question on how to enter the current date in a record automatically when the record is created.
Here is the situation. Say I have a Products table that lists the products that have come into the inventory. There is a field that denotes the day the product was introduced into the inventory. So ideally when the user creates a new record for the product, I would like this field to be populated automatically with the actual date that this filed was created by the user. Note that in future the user may edit the product (i.e other fields in this record), but the entry_date field should not be altered from what it was the first time is was created.
Is there a way I can do this? Any help much appreciated. thanks.
I have a memo field on a form. I am trying to autopopulate it when entered into. For example: I enter in clients info and then tab to the memo field and it automatically enters date and time. Then later when I go back to that same record to append to the memo field it adds the current date. This way I can go back and see all the dates and times when that person called. Any idea how to do this? Thank you
I would like to create a memo field which automatically enters the date prior to any text input from the user. Also allow dated updates in the same field
I have a database that contains 13,772 records and each record contains 34 fields. The database is used for historical research purposes. As I am constantly changing the content in one or more fields I would like to be able to have a field that would show the date of any changes that are made to any of the fields in any given record. Additionally I would like to be able to run a query, lets say every six months and extract all the updated records.
The project I'm working on is an action list with the following tables;
itemnumber - autonumber PK originator - text dateentered - date/time actiondescription - text assignedto - text targetdate - date/time forecastdate - date/time actual date - date/time remarks - text due - text (not sure if this will be correct)
Basically, when a new task is entered, all info will be manually filled in except last 3 fields. targetdate needs to be locked after entry, and forecastdate initially set to targetdate.
"due" should show how many days between dateentered and forecast date, and preferably update everytime the DB is opened. IF the current date is beyond the forecast date, "due" should read "OVERDUE".
Changing forecastdate would obviously reset the "due" field to show how many days left to complete. If a date is entered into actualdate, then "due" should show COMPLETE.
Reports will be generated based on what is coming due, what is over due, and not show what is already complete.
As you can see the purpose of this function code is to register into the TblLogChanges every single record exclusion or record change made in any form field of my project when the form is active. In other words if the user changes for example the value of the field Color in the form FrmX from Yellow to Black, the TblLogChanges will have added a line indicating: FrmX, type of change (record change or record exclusion), RecordId (in my case CADID), Current User, Date, and a complimentary string showing Field Color old value=Yellow --> Field Color new value=Black.It works fine when the field "old" value is populated (not null). However, if the feld old value is null, meaning, if the field value is originally null, or yet if the field is originally empty, and I fill it up with some data, then the code does not add an indicative line into the table TblLogChanges.
See function code below.
FYI the function is called in both Before Update and Delete events of the form with the following syntaxes: =logChangeFrmCadastro("E") for record exclusions, and =logChangeFrmCadastro("A") for record changes.
I have failed so far to make it happen. Reason is I'm able to read and understand most written syntax but still not good enough to create my own codes since I do not know to use the range of VBA commands and syntaxes available yet. This is a knowledge gap I'm doing my best to fill in.
what function code changes are required so the function be able to add an indicative line into TblLogChanges when the user changes a form field from "empty/nothing" to something?
Code: Option Compare Database Option Explicit Function LogChangeFrmCadastro(strTipo As String) On Error Resume Next Dim db As Database, rslog As Recordset Dim frm As Form, I As Integer
Just wondering if anyone new of any books that contain examples of code, functions, syntax, etc. I would like to have a good reference that I could go to instead of searching the internet everytime I need to try something new.
We have a date function that converts a text date format. Can someone help me with time function to do the same thing? We want military time. The field is like this now: txt fields. 160037 213137 224356 235716 235800 12341 21708 22732 Here is the date function we use: Function f2Date(strDateOld As String) Dim strDate As String, strMonth As String, strYear As String strMonth = Mid(strDateOld, 5, 2) strDate = Right(strDateOld, 2) strYear = Left(strDateOld, 4) f2Date = strMonth & "-" & strDate & "-" & strYear f2Date = CDate(f2Date) f2Date = Format(f2Date, "mmmm d yyyy") End Function
I need a little help. In my DB, I have a command button set up (I was tired of typing in dates) for date, but I used the Now function, which also gives me the time.
Now I have over 3000 subrecords of the main ones. I now need to queries transaction for that specific date, but it also retrieves the time.
I tried to go back and change the NOW to DATE in VB, but the code does not run.
How do I change all records that have date and time (using NOW function) and only click that command button to show only the date (mm/dd/yyyy)?
I have a textbox on my form that is for "week of", always a Monday. There is vba to populate the appropriate Monday when the user selects something other than Monday via the date picker. This code is in the on change event. However, this is not friendly to a user entering a date in this field. I did try after update event, but that requires user to leave the "week of" field. This is not acceptable in this instance, there are other form fields that change as a result of this "week of" value.I also tried evaluating the length of the text or else exiting the code. However, I was expecting the date being returned from the date picker to always be 10 positions, but for March 3rd, it would return 3/3/2015...which is only 8 positions.