Updating A Query, When Still In The Form
Jul 26, 2007
I have 2 fields in a form called 'Employee No's' which use a combo box (this information for these comes from a query). However, I have another form called 'Employee Details' (this form comes from the same table as the query is taken from).
The 'Employee No's' form opens by a command button in the 'Employee Details' Form. However, what I need to be able to do is for the query (used for the combo box) to update with information I have just put in the 'Employee Details' form while I have not yet closed the 'Employee Details' Form.
Would I use an SQL statement for this? If so what would I put?
View Replies
ADVERTISEMENT
Jul 23, 2015
I have a form which will be used as the basis to print a label.
It is bound to a query and when I open the form I pass over a 'where' condition to return 1 record. I then use the query to produce a report/label.
What I want to do is to update the form/query without updating the underlying tables to the query.
View 14 Replies
View Related
Feb 26, 2008
I have a form that opens a subform with a list of work orders by who they are assigned to. I would like to be able to close any or all of the work orders. When I close them, I need the timestamp to be updated, but I can't seem to figure out just how to make that happen. Any ideas?
View 3 Replies
View Related
Jan 31, 2005
First, let me point out that I am a new Access user, so apologies ahead of time
I have a form which has a field called 'Initials'. I want this field on the form to default to whatever was last entered (into the table called 'Main Table'). I first tried setting the default value with a DLast command, which seemed to work for a day or so, but then it returned values from mid-table - very strange
I then set up a query which does return the value of the last Initials entered (cunningly called 'Last intials entered'), but I can't get the field in the form to default to this value - it comes up with #Name?
Can anyone help, or have I not explained myself very well
Cheers
View 1 Replies
View Related
May 1, 2014
1) I Created a button that imports data into a table (Hours)
2) I created a query that finds duplicates in that table
3)I created a form put the button on said form
4) I dragged my query from explorer window onto form
5) I click button, code runs to import data into table however query on form doesnt update, I have to close and then re-open the form, obviously this is no good.
View 1 Replies
View Related
Jan 8, 2006
Hi,
I've spend ages reviewing the relationships between my tables and changing my query but cannot get this to work. I've read alot of the posts on the subject also but trying to apply the suggestions to my problem hasn't worked.
It is a database of engineering drawings. A drawing can have one or more revisions. I have written code to import the drawing and revision info into the datebase so when the drawings are actually received I need to be able to add the additional data in tblReceivedDrawings such as the tracking number, date received etc.
These are my tables:
tblDrawingRegister
DrawingNum (PK)
DrawingName
tblDrawingRevisions
DrawingNum (PK)
Rev(PK)
LatestIssueDate
ElectronicCopy
OrderNum
DrawingStatus
tblReceivedDrawings
DrawingID (PK) auto-num
DrawingNum
DrawingRev
DateReceived
ActionCode
TrackingNum
I have created a query called qSelDrawingsAndRevisions which combines tblDrawingRegister and tblDrawingRevisions.
The form is based on a query called qSelIncomingDrawings. This query joins qSelDrawingsAndRevisions and tblReceivedDrawings. It shows all the records from qSelDrawingsAndRevisions and related records from tblReceivedDrawings and is joined on the drawingNum and Rev.
Adding the extra info e.g. tracking num, date received etc about drawings that are in tblDrawingsRegister works fine. However if I want to add a completly new drawing I get an error message:
"The Microsoft Jet database engine cannot find a record in the table 'tblDrawingsRegister' with key matching field(s) 'qSelDrawingsAndRevisions.DrawingNum'
How can I get it to update the drawingNum in tblDrawingRevisions and tblDrawingsRegister at the same time?
Is it an issue with my query or relationships?
Or do I need to write an OnUpdate procedure for the DrawingNum textbox so that it created a new record in the DrawingsRegister table to correspond with the one in the DrawingsRevisions table?
I have a feeling that this might be overcomplicating it and that I just need to change the query?
Am very confused about how to approach this and would really appreciate a few pointers...
View 12 Replies
View Related
Apr 29, 2005
Hello
I have made a form based on a query that pulls information from 4-5 tables. I would like to be able to change information in those 4-5 tables by using that form, but I am unable to do it. I opened up the properties for the form and set "data entry" and "Allow edits" and "allow additions" and "allow subtractions" all to YES. That didn't help.
Is it possible to do this, since the form is based on a query? I couldn't figure out a good way to set up the form getting the information directly from the four tables. I'm not sure why it's been so difficult.
I have one table full of all of the various titles I have. The tables are related using those titles, and each table has a different sort of information for each record. So, the "main" table is "ALL TITLES," but when I go make a form, I can't get ALL TITLES to be the controlling table. It's very frustrating. But a query works beautifully--I just can't change anything.
(I would like to have the form be a "user-friendly" way for people to make changes.)
Thanks for your help.
-Siena
View 2 Replies
View Related
Dec 23, 2014
I have a table holding clients data, I need it to work out the age of someone when an application is made, which I would like to be stored on said table. I have two fields [DOB] and [signed date], which I have used created a query with and an (unbooud?) field called age at application with the expression =DateDiff("yyyy",[DOB],[Date signed])
This works fine when I run the query, but I am unsure of the new next step of how to commit it to the table and even if that's possible.Ideally I would like this to run behind a form maybe using some click event after the [signed date] field has been entered.
View 5 Replies
View Related
Nov 24, 2014
I am building a Inventory Management Application for Tyre Shop. I have SaleMainTbl and SaleDetailTbl both used for preparing daily sale summary. I have Mainform based on SaleMainTbl with TxnDate and Total Amount (Sale) and the TxnDate is in one to many relation with SaleDetailTbl. FormSaleDetail is multiple row(continuous) form that makes billwise summary of each day having -TxnDate--BillNo--ItemSold--Company--Qunatity--Rate--Amount fields. I have inserted this form in FormSaleMainTbl.
So FormSaleMainTbl is Main form and FormSaleDetail is subform. TxnDate in FormSaleDetailTbl is automatically taken from SaleMainForm. I have further added text boxes in Main Form to show company wise sale for each day for which there is a query build one for each company that takes the currently loaded date from FormSaleDetail and calculates the Sale (Sum) of each brand (Company) of Tyres. All these objects are working very fine. However I have to close the MainForm and reopen it for result of query to appear in the appropriate text box in Main form.
Is there way to do this as soon as record is entered or at least at the end of completing the entry of each days sale transactions without closing the form. So the gist of the problem is realtime display of query result in text box on a form or updating the form screen immediately on updating any record or at the most after completing the updating of form but without having to close the form.
View 5 Replies
View Related
Aug 24, 2004
I have set up an ACCESS database of journal articles. Each article has one or more authors. I have created a form listing the article title, the name of the journal etc. Included is a subform listing each of the authors. The authors are listed in the order that their names appear in the article. I wrote a query to sort the articles alphabetically according the name of the first author (in the subform). The main form is based on this query so that all the articles are sorted according to the name of the first author. However, the query uses the “First” feature in the “Total” row on the query. The use of this feature precludes me from updating information in the form that is based on the query. Is there a way around this problem and if so what is it?
View 1 Replies
View Related
Dec 16, 2014
I have a form that has combo boxes and text fields (as well as sub forms). There is also a button linked to some code that says'
Private Sub cmdQuote_Click()
'Creates quote date and prints quote
Me.QuoteDate = Now()
Me.cbAgentID.Requery
DoCmd.OpenReport "Quote", acViewPreview, , "BookingID = " & Me.BookingID
End Sub
When the button is pressed the QuoteDate field (it is bound) should be be populated, but unfortunately it is not. I have played with refresh and requery but cannot derive a solution.
View 1 Replies
View Related
Mar 24, 2006
I have a table with book information. I want to be able to change information in that table by using a form. Is there a way for when the form opens, to type in the books number to bring up that information so I can change it?
View 1 Replies
View Related
Dec 5, 2006
Hi,
I've generated the following SQL statement...
SELECT (Int([age]/10)*10) AS MYG, Count([MYG]) AS Frequency
FROM Data
WHERE ((([Data].[Date of referal]) Between #1/1/2006# And #1/1/2007#) And (([Data].[Age])>10))
GROUP BY (Int([age]/10)*10);
the [MYG] field is basically an integer 10,20,30,40,50 etc I wish to change this field to 10 - 20, 20 - 30, 30 - 40 etc.
Is this possible using SQL?
View 4 Replies
View Related
Jan 14, 2007
Hi all,
I have been trying to make 2 tables join (the end goal is to overwrite some data in one table, with data in another). The table layouts are as follows
Table: dbo_device
dev_name (prim key)
dev_ip_address
dev_memory
Table: firmware
name (prim key)
fware
All data types are matching, so that shouldnt be the problem. I want to grab the value fware from the firmware table and put it into the dbo_device 'dev_memory' field, where the dev_name & name are the same. Here is my query...
------------------SQL---------------------------------
UPDATE dbo_device
SET dev_memory = f.fware
FROM firmware f
INNER JOIN dbo_device d ON d.dev_name = f.name
------------------/SQL---------------------------------
I am getting the error 'Syntax error (missing operator) in query expression 'f.fware FROM firmware f
INNER join dbo_device d ON d.dev_name = f.name'
Any help would be greatly appreciated!
Thanks
View 4 Replies
View Related
Jul 26, 2007
I have 2 fields in a form called 'Employee No's' which use a combo box (this information for these comes from a query). However, I have another form called 'Employee Details' (this form comes from the same table as the query is taken from).
The 'Employee No's' form opens by a command button in the 'Employee Details' Form. However, what I need to be able to do is for the query (used for the combo box) to update with information I have just put in the 'Employee Details' form while I have not yet closed the 'Employee Details' Form.
Would I use an SQL statement for this? If so what would I put?
View 1 Replies
View Related
Aug 22, 2006
In the attached databse, there is an Available Days function in qryMain. I'd like it so that when a day of the week tickbox is checked, to update the query. However I can't seem to get the Available Days function to access information from the query. I've had this working using a form previously, but can't seem to get it working with a query. I know my code is messy, still figuring out access, and VBA stuff.
I appreciate I also posted about this a while back, and that was a big help. Since then though, I've had to rebuild the database, and this is the best version so far. Would love to get it working like I imagine in my head! :confused:
I'd also like to get the frmUserList page working so that when Open User button is selected, it will open the users page, but give access to all user so you can switch through them. There doesn't seem to be a wizard way of doing this, do I need to do more VBA code?
View 2 Replies
View Related
May 21, 2005
I have a table called Primary Employees and another table called Secondary Employees. I also have a form where you can add new employees, which updates the Primary Employees table. What I would like to do is, after I add a new employee have the new data update both the Primary and Secondary table at the same time. These tables have the same information within them. These two tables are currently relational to one another, but I still have to go in and manual update the Secondary Employee table after I add a new employee. I have to have two databases because of other form requirements. Any help you could provide would be greatly appreciated.
View 4 Replies
View Related
May 9, 2005
Hey guys..
For some reason, after i added new records to my table, the fields on my form don't update... :confused: .. any idea why and how i can solve this problem ?
any help will be appriciated.
View 5 Replies
View Related
May 14, 2005
How would I go about updating a table from a form? My table consists of employee contact information, ie.. Cell phone, pager number, home phone.
I have created a forum with unbound combo box called employee. As I choose the employee name all other fields are populating just as i want. After I update the form with the correct system contact information i want to be able to save the data and have it update the table. It appears the only data not updating the table is the anything in the combo boxes that are unbounded. Any suggestions?
View 3 Replies
View Related
Jul 4, 2005
If you open the attached sample db you will see that I have a cascading combo box (It is working fine).
The data for the tables that are the source for the combo box are imported from an excel sheet.(This works fine)
Now my problem the data from excel is variable after the data is imported into access I want to add to it items from another table.
After the data is imported into both tblModel and TblParts I want to append to tblParts each item from tblFixed for every Model.
If you open tblPartsEXAMPLE you will see what I want to do (I added this manually).
I hope that my expanation is clear and someone can offer some advice.
Thank you in advance.
View 2 Replies
View Related
Jan 26, 2006
Ok so ive built a form that a user can use to enter in data that will update a certain table.
The table has for fields: Email, Password, Active and ID.
In my form ive got rid of the active and ID fields as i want them to update automatically when the user fills in the email and password and hits the submit button on the form.
The only problem im having is getting my head around how i would update my other two fields once the user clicks submit?!
i was thinking that i could simply code the submit button to add the relevant info into the fields eg onclick active = 1 and ID = previous id +1 but im completely lost
Any help or ideas?
View 1 Replies
View Related
Mar 10, 2006
I have been struggling with this for weeks now and it must be fairly simple.
I have a form linked to a table with the fields
number
road
town
and
partnernumber
partnerroad
partnertown
I input the first 3 fields and I would like to be able to click a command button and copy those 3 fields to the last 3 fields to save extra typing. I cannot get the command to work though.
any help appreciated
thanks
View 7 Replies
View Related
Aug 8, 2006
hi guys i have a list box which has 4 columns that come from a query. when a user double clicks a selected item, i want the frmUPdate to open with the selected item; it gives me no error it just always goes to the 1st contract . have no idea what else to try...
here is the code:
Private Sub List33_DblClick(Cancel As Integer)
Dim rs As Object
DoCmd.OpenForm "frmUpdate"
Set rs = Forms!frmUpdate.Recordset.Clone
rs.FindLast "[ContractID] = " & str(Nz(Me![List33]))
If Not rs.EOF Then Forms!frmUpdate.Bookmark = rs.Bookmark
DoCmd.Close acForm, Me.Name
End Sub
View 5 Replies
View Related
Aug 10, 2006
on my form i have a few radio buttons, check boxes, text fields and combo boxes. i am able to change and update all fields except combo boxes. it modifies the wrong table...
combo_table
------------
id value
1 house
2 school
3 work
if on my form the combo box for a specific record shows house selected, the value of 1 (the id from combo_table) should be the value put in the main talbe...if this is changed to option 2, school, the main table should have 2 in that field...
what happens though, is if i change from 1 (house) to 2 (school) combo_table ends up looking like the following:
combo_table
------------
id value
1 house
2 house
3 work
View 4 Replies
View Related
Dec 30, 2004
Hey ya'll,
I'm trying to figure out how to subtract a value entered on a form from one table, from a column in a different table. I was trying to us an AfterUpdate on a texbox to run some VB that would run a SELECT statement to get the current value (InStock), subtract the value in the textbox, and run an UPDATE statement to update InStock. But all I got were a lot of errors saying that I was using mismatched objects and nothing was getting update. Please help.
Thanks,
Chris
View 4 Replies
View Related
Dec 30, 2004
alright I have a form and I need a couple of text boxes on there to add information to a different table than the other ones. I found this code somewhere on this forum can you tell me if I can use it for what I need, A more detailed explination of my project might be nessecary.
Code: sub AddRecord_Onclick docmd.setwarning false if not isnull(txtName1) then docmd.runsql "INSERT INTO table (areaname) VALUES('" & txtName1 & "');" txtName1.Value = Empty endif end sub
what is the proper syntex for the Insert INTO part, Table is obviously the table I want it inserted into, what is (area), is this the field I want it inserted into?
View 4 Replies
View Related