Queries :: Equipment Check In Form That Will Update One Record?
Mar 12, 2014
I have a transaction table the last record is [EquipIn]. during the equipment checkOut process all the other headings in the table are filled in. The idea is to fill in the [EquipIn] record a couple of days later when the equip is returned. How the heck can I make a equipment check in form that will update that one record? I can't do this manually as we have 1000+ pieces of equipment.
View Replies
ADVERTISEMENT
Jul 31, 2013
My desired output of this is to have a database to allow me to quickly check in and out equipment and personnel using a barcode scanner. I am using access 2013 and started with the asset tracking template downloaded from Microsoft. Where I am hung up right now is adding the personnel check in and out (each member of the team will have a barcode attached to their id) I want to be able to just scan their badge when they show up and again when they leave. At the end I will run a report that shows who was on scene (it is for a search and rescue team) during a certain day or time range.
I have added two new tables one check in and one check out the only fields are firedeptID and CheckIn or CheckOut a date/time field CheckIn and CheckOut Auto populatewith Now(). The first problem is that I think I need to turn off (if possible)the auto creation of a new record every time, when I scan in an ID right now that record gets the time stamp of the last time the new record was created IE.Last week when the last person scanned in and the new record was created. I assume I am going the same type of issue when I start working on checking out the equipment.
View 8 Replies
View Related
Jul 2, 2014
The problem I have is, that I need to insert an apointment into de database but first I need to verify if there is a record or an apointment in that room that day the same hour, if that is so send a msgbox saying an apointment already exist in that room this day at this hour.
i tried using dlookup but it only works in one record using just one criteria
View 10 Replies
View Related
Apr 13, 2005
I need to know how to check if there is a record set matching a name and insert record if there is not one, otherwise just update if a record does match. See code:
Code:<%Name = request.form("name")picture = request.form("picture") opencnset rs = Server.CreateObject("ADODB.RecordSet")'if no record matches the nameSQL1= "INSERT INTO background (Name, Picture) VALUES ('" & name & "', '" & picture & "')"'elseSQL1= "UPDATE background SET Picture = '" & picture & "' WHERE Name= '" & name & "'"cn.Execute SQL1closeCN%>
Thanks in advance for any help you all can provide!!!! -Chris Gordon
View 4 Replies
View Related
Jan 4, 2015
How can I update all the queries when I enter a new record in a form? When I enter a new employee record in a form, I want all the queries that are related to the employee information table to be updated with this new entry.
View 4 Replies
View Related
Feb 22, 2008
Help! I'm designing a database for my A level project at college and I just can't get this one section to work. I've spent alot of time linking things up so that you can't double book one of 4 rooms. It's a booking system for a recording studio. The thing is I have 3 basic packages of equipment and you can only choose one for each booking. The price is diplayed at the bottom of each package. I want to be able to check a box and then I want this price to be added to total price. I cannot link update queries to a check box I've tried every songle way I know. I'm not too familiar with access either :S. One more thing, I want to be able to tick a box which says Discount and then I want this to update the total price field again so it is multiplied by 0.9. I have manage to figure this out in an update query and it is also based on the fact that a band has made a deposit that is bigger than £0.00. I just cannot link it to the form.
If anyone can help it'd be much appreciated, I'm panicking too much over this project.
View 2 Replies
View Related
Jul 3, 2013
I am trying to automatically update one table to another each time a new record is added to my form, I have tried using the Update and the Append Query is there another way to do this without using code?
View 4 Replies
View Related
Mar 23, 2013
I've got three tables:
Code:
tblequipment
equipmentid
equipmentnumber (user defined ID)
tblrentals
rentalid
rentaldate
rentaltime
fromparty (c for customer, e for employee, o for other)
frompartyid (foriegn key to either customer, employee or other)
toparty (same as from)
topartyid (same as from)
tblrentaldetails
detailid
rentalid
equipmentid
How can I get a list of ALL equipment showing the most recent date and time, also showing the respective toparty and topartyid? I can get it fairly easily, except for including toparty and topartyid.
View 2 Replies
View Related
Sep 23, 2013
I use the code below when a form is closed to either save or undo changes. However I only want the msg box to appear if there have been any changes to the record that the form is based on, if there aren't any changes then it will just docmd.close without the msgbox. How would I check if there have been any changes to the record? I think you have to use 'Dirty' but im not really sure how to use it.
Private Sub CLoseUR_Click()
Dim strMsg As String, strTitle As String
strMsg = "Do you want to save changes?"
strTitle = " Save Changes?"
[Code] .....
View 3 Replies
View Related
Oct 1, 2014
I have a form which is based on a query which selects information from three different tables. All fields apart from one are locked, all are enabled. The table the field I wish to update is native to the current DB i.e. is not a linked table.
when I activate the form and try to click on the Check box, which is not locked, I get a beep but it does not change state.
I am using Access 2007 on win7 Pro.
View 5 Replies
View Related
Aug 19, 2014
I currently use
Code:
strSQL = "INSERT INTO tblDepartments (Department) VALUES(txtnewdept)"
To insert new departments into a table, however id like it to check to see if a department name exists in tbldepartments.department to prevent duplicates being added?
View 11 Replies
View Related
Dec 22, 2004
How do I check, before opening the form, whether any records exist in the table bound to the form?
Thanks
View 3 Replies
View Related
Apr 16, 2008
I have a multi user database that has record locking turned on at the form level. If one user is in that form making changes it locks that record so no other user can make changes. When another user tries to edit the same record they are only notified after they hit save. Can you have them be warned that this record is locked before they waste time entering data?
View 1 Replies
View Related
Jan 26, 2015
i want to be able to create an On Click Event when pushing a command button that will run an Update query to update a record and after it has been updated that specific record will pop up on a Form and be displayed. i know a different way is to run the Update query and then have it displayed in a Select query but i want it to be displayed on a Form instead. is it possible?
View 4 Replies
View Related
Aug 10, 2015
I have a query which reads a table, calculates some values and updates some of the table's fields. The issue that I have is that sometime (and randomly) the update skips one record. The query uses an inner join and looks as follows:
Code:
UPDATE TEMP4 AS t1 INNER JOIN TEMP4 AS t2
ON (t1.Month = DATEADD(""m"",1,t2.Month))
SET t1.index=(1+t1.ratio)* t2.index, t1.ratio = IIF( t2.index=0 ,t2.ratio, t2.index)
I can run the query multiple times without seeing any problem. When the issue occurs I do not receive any error.
I should also add that the query/update is run via VBA code. Not sure if this makes any difference.
Why this happen and how I can force the query to always update all records?
View 9 Replies
View Related
Jul 1, 2015
I can do this in like 5 seconds in SQL Server but I can't get the query to even ALLOW me to update records.
Table1 - Columns
Query1 - ColumnDesc
Code:
SELECT DISTINCT C.Column
FROM Columns C INNER JOIN (
SELECT Cols.Column, Count(Cols.DataType)
FROM (SELECT DISTINCT Columns.Column, Columns.DataType FROM Columns) Cols
WHERE Cols.DataType = 'char' OR Cols.DataType = 'varchar'
GROUP BY Cols.Column
HAVING Count(Cols.DataType) > 1
) C2 ON C.Column = C2.Column;
Simple, straight forward query, that grabs all the rows from table Columns where there are more than one DataType per Column [name], and either one of those datatype strings are 'char' or 'varchar'.Now I want to UPDATE table Columns to set all of the columns whose "column" value is in the above query, and set all those DataType values to 'VarChar'. Thus I run that UPDATE query, and the above query should come back empty afterwords in SQL Server I would simply write:
Code:
UPDATE Columns
SET DataType = 'varchar'
WHERE EXISTS (
SELECT 1 FROM ColumnDesc INNER JOIN Columns ON ColumnDesc.COlumn = Columns.Column
)
And this would already have been done.But Access doesn't like that syntax. using the designer it created sql like this:
Code:
UPDATE Columns INNER JOIN ColumnDesc ON Columns.Column = ColumnDesc.Column
SET Columns.DataType = 'varchar'
But that wasn't an "Updateable" query.I have to run this on several patterns and right now I'm completely screwed if I can't get this to work.
My end goal is to have:
SELECT DISTINCT Columns.Column FROM Columns
return the same # of rows as
SELECT DISTINCT Columns.Column, Columns.DataType FROM Columns
for each duplication I will have to do different algorithm, but I can't even get one update query to work so I'm currently frustrated (and ready to reaffirm my belief that Access should have been discontinued 5 versions ago).
View 1 Replies
View Related
Jun 26, 2014
I have this update query that is triggered by an after update event on a main form. The record being updated are in a continuous subform. It works well except from the last added/modified record. If I save and close the form and then open it again it works for all records but if modify or add a record, the update query will not work for that last modified/added record.
I have tried several things such as save record, use dirty = false for the on exit event of the subform control but nothing works. Here is the procedure:
Code:
Private Sub cboPoCurrency_AfterUpdate()
On Error GoTo ErrHandler
Dim db As Database
Dim strSql As String
Dim lngID As Long
Dim dblRate As Double
Set db = CurrentDb
[Code] ....
View 14 Replies
View Related
Mar 15, 2014
I want to create an update query to update 20 record with the first item in combolist then the next 20 record updated with the second item in list...
View 2 Replies
View Related
Jun 5, 2013
I have two tables "TABLEA" and "TEMP"
fields in both tables are
Cust ID (Primary key)
Cust Name
Address
Cheque No
Amount
Location
Zone
I need query when i click on command button on form
if "Cust ID" which is primary key in "TEMP" Table match with "Cust ID" from "TABLEA"
It will update the record in "TABLEA" if not then append the record
View 1 Replies
View Related
Apr 19, 2014
My table occasionally gets a second record added for the same person. What is the easiest way to update the new record with the non-zero fields from the older record, then delete the older record? There is a unique id field as well as a timestamp, so knowing which is older isn't a problem. Is there an easy way to do this?
View 2 Replies
View Related
Jun 3, 2013
I have a field called uniqueID which I would like to update based on 2 other fields that are already populated in my recordset (from running previous queries). I heard it is not possible to do an Update Select like shown below.
select max(uniqueID) from myTable where a = "value of field a from first record in record set" and b = "value of field b from first record in record set"
If it is true that I cannot do an Update Select then I am trying to do something in VBA. How can I Loop each row in the record set and store the values from fields a and b. I would obviously then need to pass those values into the sql above and store the result in a variable. I would then do a straight update to put the value of uniqueID into myTable.
View 1 Replies
View Related
Aug 22, 2013
I have a table called tblCompanies. When a company acquires another company, I need a method by which the acquired company's CompanyID (PK) can be updated to the new company's CompanyID (PK). I also need to be able to update all related CompanyIDs (FKs) to the new value in related tables.
In cases in which the new company does not have an existing record, there is no problem: the company name simply gets changed to the new company and the existing CompanyID is maintained. I then use an audit table and Track Changes function to keep track of the company name data and a union query to keep the old names in the selection lists.
The problem is when both companies already have existing records in the table.
So, let's say I have records for Company A and Company B. Company A merges with Company B and Company B is now the main record. What is the best, simplest and easiest way to update the CompanyID (PK) from A to B and change the CompanyID (FK) to the new value in all related tables?
I am envisioning a pop-up form that directs the user to select the new company and then an update query happens behind the scenes... but exactly how does the criteria for the update query get selected and how do all the related tables get updated? My vba skills are pretty basic, will I need extensive coding to do something like this?
View 6 Replies
View Related
Jul 11, 2006
I am currently creating a data base in access for reservation of audiovisual equipment. My form provides the selection of the equipment, the date and hour to be used and hour to be returned. My mayor concern is to not reserve the equipment twice(same day and hour). I want to be able to have a message telling the user that the equipment is not available upon the selection of the hour. Any ideas on this.
Thanks
View 2 Replies
View Related
Dec 31, 2007
I need help finding an existing or making a db. This db does not have much to it, so I am getting frustrated finding/making one.
My company has equipment that is stored in one of three places, customers, trucks of employees, and other(like warehouse, or out for repair). The db should be able to give me a report of where everything is on a given day, and a report of what was in a given customers property during the job(this is not for a single day, but for the duration of the job).
If someone knows of an existing db like this, I would appreciate a link. If you want to help, it is appreciated. At this point I would not mind paying someone to do this for me, as long as it wont cost too much.
View 9 Replies
View Related
Jul 12, 2005
Hi
I am new to db and would like to do a simple db for items of equipment going out and coming back in showing who has been allocated what.
So one person could have many item but the item can only be issued once until it is booked back in. I would also like a history of transactions.
Only something simple, so we have a record who has what if we need to find something and when they had it etc.
Many Thanks
Scott
View 5 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