Check To See If Value Previousl Entered.
Feb 7, 2006
I would like to check to see if a previous date value has been entered for a specific record and display a message if it has. I have spent some time researching vlookup and vcount but im not quite there in what i want to achieve.
I have a data entry subform, linked to my main form through StairID. The subform is called tblEstateInspection and has a PK called estateinspectionID, stairID is a FK and links it main table.
Like i say i have been investigating what other people have done using dlookup / dcount, what i want to do is check that a specific date has not been entered for another inspection for the same stairID, i guess what i have got below at the moment just looksUp the value and because it is never null the messagebox always shows? How can i ammend it so that if it finds records that have same stairid, checks Inspectiondate field and only shows message if the new date matches old date
Private Sub InspectionDate_AfterUpdate()
Dim strFilter As String
Dim check As Variant
strFilter = Me!StairID
check = DLookup("[inspectiondate]", "tblEstateInspection", "[stairID] =" & strFilter)
If Not IsNull(check) Then
MsgBox "You have entered this exact date for this staircase before, be careful!", vbExclamation
End If
End Sub
Thanks
View Replies
ADVERTISEMENT
Jul 28, 2005
Hi folks,
I have this situation: a table with patients information and IDs, and a table with evaluations for those patients (identified by ID).
I am trying to make it so that the user can't add the same evaluation twice. I want to do it by checking if there is already an evaluation for that patient with the same date.
I know how to show evaluations only for a patient, but I don't know how to check if the value entered by the user in the date field is a duplicate (case in which he shouldn't be allowed to enter it). I assume this is done somehow through the "validation rule" property? But how should the expression be?
Thanks a lot!
View 1 Replies
View Related
Nov 30, 2013
I have two four tables. Invent, trans, NewOrder and reorder tables. The new order table is not joined by a relationship unlike the others which are joined with the Invent ID field.
The new order table has the fields(ID,QTY,NAME,Order Date). I want to use this to order new items that are not in the Invent table. What do I do to check that I don't enter a new item name in the NAME field that is already present in the Invent table?
View 3 Replies
View Related
Nov 29, 2012
working through validation rules etc at the minute on my database. Have come across this one is sort of stumping me. I have a tick box in the field "Medication to be repeated" the next field after it is "Date to be repeated on". I am looking a validation rule which makes it that if the checkbox is ticked then date to be repeated must contain a valid date value.
View 8 Replies
View Related
Jul 30, 2012
I am fairly new to access but so far I have been able to get what i need from it, until now. I am trying to find a way of comparing two sets of data to find out an employee's average productivty.
Table 1 -Hours Worked (by day)
- contains 'name' 'date' and '# of hours' worked
- an employee would enter the hours here on a daily basis
Table 2 - Contracts Keyed (by month)
- contains the number of contracts worked that is derived from seperate system
- this is entered on a monthly basis (so for example: John keyed 30 contracts for the month of January)
- the system i am pulling this info from does not have the ability to pull a daily count of contract per employee, only a range of dates and it then provides the sum for that range (unless I ran a query for each day, for each employee which would take me hours)
- employees dont have access to this system to enter their own # of contracts keyed on a daily basis.
- for entry, so far i have just been putting the first of the month and then the # of contracts.
In a nutshell, this is the calculation I am trying to create:
(Sum of "# of hours" for the month) / (total "# of contracts keyed" for the month) = employees average hourly productivity.
I have tried to do this with various types of queries and reports but with no luck, I get a prompt saying that access can't compare the 2 fields.
Is there a way to compare the data that is entered daily with the data i would enter monthly?
View 2 Replies
View Related
Jun 26, 2014
how can i make a image appear in my form when there is a check in the check box from the table?
View 14 Replies
View Related
Mar 19, 2007
Long time lurker, first time poster.
I'm in need a of a check-in/check-out application for my company. We have about 550-600 employees at any given time and our turnover is about 20-30% per year. Our check-in/check-out process requires our employees to personally visit between 30-40 areas in our company (personnel, safety, credentials, parking, insurance, etc) within the first month of employment. This is currently done manually and is a huge drain on labor, especially when check-in sheets are lost, misplaced or, in some cases, forged.
I'm looking to build a database that would be intranet based, password secure (by check-in area) that would allow the new employee to present at a particular check-in, check-out site, complete that portion of the check-in/out process and then allow the person responsible for the check-in/out to enter the status into the database. At any point in the process, I would want to know the status of the person checking in/out (how long they've been checking in/out and what portion of the process have they completed).
Can this be done in ACCESS?
Thanks
View 1 Replies
View Related
Apr 25, 2005
Hi
I have sendkey "{f7}" on loss focus.
this works great as a spell check but then I get the mesage box that spell check is complete.
How do I stop this box from occuring?
View 2 Replies
View Related
Dec 8, 2005
Is it possible to put a "tag" (probably the wrong term) on individual record entries? So that on a shared database the administrator could see who entered what. That way if there is a problem the administrator would know who to speak to or who needs retraining/firing ha:)
Ive looked around and havent come up with anything.
Thanks
View 5 Replies
View Related
Aug 21, 2007
Hello
I'm currently doing a query, when a report is received, we enter a date, i would like a query which would show records where the received date has not been entered. i have tried putting in isnull() but does not work.
Can anyone help?
Thanks
View 3 Replies
View Related
Nov 26, 2006
Hi all,I'm working on a library database for a small collection.I have two fields, 'Date Out' and 'Date IN'. Is it possible that whatever date is written for the date taken out, I can set the 'Date IN' to be 7 days later than that date?Thanks in advance.
View 4 Replies
View Related
Oct 21, 2005
Gurus,
I seriously need some help with the following.
What I need to do is when I enter the data in the form and before I go to the next record I want to save this row in the table and then insert two more rows with the same values (that I just entered and saved in the table) while incrementing the index field. I also want to programatically manipulate a field value in the second and third rows that I will insert before commiting.
For Example:
Tbl-A
Reg_Num Number (Index)
Name Text (30)
Reg_Type Text (1)
Category Text (10)
Sub_Category Text (10)
Short_Desc Text (10)
Long_Desc Text (50)
1st row:
10001, "PSUS", "A","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
After I enter these values I click on "SAVE" button. When I click on save, I want to insert the same row twice (notice Reg_Num and Reg_Type values) in the table and increment Reg_Num and change the value of Reg_Type.
2nd row:
40001, "PSUS", "W","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
3rd row:
60001, "PSUS", "X","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
As you see, I am incrementing the index field value by 30,000 if Reg_Type is "W" and by 50,000 if the Reg_Type is "X". What it means is copy the row that I just entered, insert it in the table, change the Reg_Type value and increment Reg_Num based on the business rule. COMMIT. Do the same for the next row.
I have about 20 Fields in the table. I do not want the user to type 10 times the same values and make mistakes. This is just an example. I have about 8 different Reg_Types that needs to be stored in the table everytime a new Reg_Num is entered with Type "A". User can enter any Reg_Type but to make my life easier I'm restricting to start from Reg_Type "A". For each Reg_Type the Reg_Num needs to be computed because it is extreamly important in our application.
Hope I explained it right.
Thanks a million in advance.
PS
View 3 Replies
View Related
Mar 3, 2006
Hi All,
I've got a form with a series of combo boxes which are dependent on each other, however i keep finding that after ive entered some data and left a record, when i then return to the record, some of the information ive entered has been deleted and the combo box is blank.
I think it must be requerying the combo boxes everytime the record opens but i dont know why, i have only put requerys "OnChange" because that is the only time the dependent combo boxes should be requeried.
Once the info is entered and ive moved on to a new record, i need for it to stay that way when i return to the record and only change again when i edit it.
Help please anyone, its been doing my head in.
Cheers
K
View 4 Replies
View Related
Mar 18, 2005
I have a form that the user will enter data, when the user has finished entering the data, i want them to click on a button, with a yes or no option button on it.
if the user selects yes (approved)......i want the record to be emailed to a few peoples email address.
i was thinking that i could store the email address's in a table and email the record to whoever appears in the list.
if the user selects no (Amend Record)..... i want the set focus to go back to the first field of the last record for Amendment.
Can this be done easy enough ?
if so how please.
Cheers
Andy
View 6 Replies
View Related
May 22, 2015
I have a form with a number of entry fields and after a button is clicked I write to an MS Sql datatable. Everything works fine as long as I put a value in each field. If I do not put a value in one of the fields the sql does not run and the record is not added / updated in the database. I have tried checking the length of the data in the field using
Ent_Length = Len(tb_TagDesc)
or
Ent_Length = Len(tb_TagDesc.Text)
or
Ent_Length = Len(tb_TagDesc.value) but nothing shows.
I am using Access 2007, 32 bit Windows 7
View 1 Replies
View Related
Apr 21, 2006
Hi, I have a simple form that requests to enter date using a textbox.
How can make the date textbox to display last entered data (in this case last entered date like 2006.05.05) after used pushes button "new record"?
View 1 Replies
View Related
May 19, 2005
Hi there
I have a small problem that I was wondering if someone could help with.
When a user creates a new record I would like it so that some html is written automatically in to a defined column.
Is this possible? I tried to use the default value property of a column but access does not like it.
Any ideas :confused:
Thanks :D
Jools
View 14 Replies
View Related
Feb 6, 2006
Hi there all, I tried the search option on this board but maybe its just that i dont know how to ask the question.
I have a text box on my form with and afterupdate event that inputs todays date in to another text box on the same form, can this be set so that once that date is apperas in the text box that no further updates to the date can take place.
Thanks in advance for any help.
TIDMAN.....:confused:
View 6 Replies
View Related
Aug 9, 2006
I have look around in the forums, but I haven't found what I was looking for. I just maybe didn't use the correct search criteria. But anyway this is what I am looking for.
When a certain user Logon into the database. I would like the have a message sent just to that one particular user. Bottom line is. When a report is due and that user is responsible for it, I would like a notification go to that user.
Can this be done and how would one go about this?
Again thanks
View 3 Replies
View Related
Nov 8, 2004
HELP!!! I am getting quite desperate. I am a novice. I have made a database for customers, products, etc. They all have good relations. I have made a query where I can see who bought what and when and how much it costs. Now here's the problem. When my prices in my product list (this is the table of which the prices show up in my form) have to be altered (because of prices going up), it automaticaly changes the query and the form!! According to messages stated in this forum, I have opened the properties in the text boxes and changed the price fields, "enabled" to no, "locked" to yes, and the forms DataEntry to yes. Strangely in the North Wind example, the prices shown in the form (entry form), are extracted from the subformdetails table. But how can you extract something from a table if there is nothing in the table?? Totaly I have four tables (Orders, Orderdetails, Products and Customers) Alle these tables are joined on a one to many basis.
Please can somebody help me.....
Thank you
Anouk (Netherlands) :confused:
View 14 Replies
View Related
Jun 28, 2005
I have a field in a database that needs the data entered without any spaces and I'm trying to figure out how to set either the validation rules or the masks so that the system will either automatically delete any spaces or warn the user not to enter them.
My preference would be for them to automatically be deleted.
Any ideas, suggestions?
I can figure out how to make either all numbers or all letters, but the data is both so that doesn't work.
Thanks, in advance, for your help.
Charis
View 4 Replies
View Related
Sep 11, 2007
I have a form with several tabs on it, where the user enters various info.. I want to have the user hit the save button and have all info saved to a single table. Is there an easy way to do this. Please excuse my ignorance but I am fairly new to Access. Thanks in advance!
View 9 Replies
View Related
Apr 20, 2008
Hi again
I've done some searching on this question and it seem everyone is pointing to the DateAdd function, so here is my current problem.
I have a date/time field called SponsorshipContractDate. When a contract is signed the date is entered. I need the system to calulate the renewal date for the contract which is alway 1 year ahead.
The DateAdd function works only if I hard code at date into it e.g.
DateAdd ("yyyy", 1, "01-Jan-08")
But as contracts are signed throughout the year this just doesn't work so I tried this:
DateAdd ("yyyy", 1, "SponsorshipContractDate") but the table won't save and this is abviously not right. In my head it makes sense but I don't understand how to get the formula to look at another field during it's calculations
Am I using the wrong function?
I will keep looking around.
Thanks heaps
View 4 Replies
View Related
Dec 8, 2005
Hi,
An Access database table I'm looking at has a date column, where date is entered in UK format (dd/mm/yyyy). However, upon entering the database, the date is somehow converted into US format, despite me passing the date into the table as dd/mm/yyyy.
The trouble started when someone else worked on the database - leaving us now with all of the old records in UK format (correct) but all new entries to that column in US format.
Please note, when I open the Access table, all of the dates for the past 2 years or so are fine (dd/mm/yyyy) but recently, since someone else worked on the file, the new records are appearing as mm/dd/yyyy. Within the same table column we're getting apparently mixed formats.
I'm aware of using session.lcid=2057, but would prefer just to be able to have the dates appear in the right format in the database itself rather than having to use this (I'm concerned if I use lcid, it might balls up the older, correct records in the table).
How can this have suddenly changed, and more importantly, how can I get the records into the table in UK format?
Thanks very much for your help...
View 2 Replies
View Related
Sep 8, 2006
Here is my problem. We stage outages once 3 tickets have been recieved for the same problem type, but only if all three tickets are entered within 16.65 hours or 999 minutes. I.E. the third ticket is received within 999 minutes of the first ticket. How can I capture this based on the field time entered?
:confused:
View 1 Replies
View Related
Mar 12, 2008
Hello All,
I am creating a database that is supposed to capture the employee's type of work, time it takes to do the work, etc...
So far, it does what it's supposed to do but my record's are all over the place.
E.g. i have tables called:
tblDailyActivities - this table is supposed to store all record without sorting.
tblemployees - this table is supposed to have a list of employees and when maximized, all records associated to that particular employee should be listed.
However, the i have right now is that instead of listing it under the particular employee, it lists the employee's name individually for each item listed.
What i want is to for the tblemployees to be listed like tblfunctions.
see attached database since i probably am not making any sense right now.
Thank you,
John
View 9 Replies
View Related