Using Form To Update A Table
Jul 7, 2005
Hi everybody.
I have a problem with a form that will update two tables.
I have 2 unbound comboxes that define the lower and upper
limit of the data I want to update.
Something like Combo1 = (#5-1) ; Combo2 = (#5-9)
Then I have 3 textboxes that are unbound. They will recieve
information from the user(keyboard), about the location of
certain pictures on my HD.
(Textbox1) will be the path of the picture, (texbox2) will be
the name of the picture and (textbox3) is the database number
of the picture (like 29).
I also have a (commandbutton1) that would update the respective
tables related with the form, Textbox1 will update the field
[Objecto] of table1, Textbox2 will update the field [Name]
of table1 and Textbox3 will update the field [PhotoNumber] of
table1.
I don't know the code that should go on the click event of
the commandbutton.
Can someone help me?
With best regards
Jorge
P.S. The lower and upper limits should also be updated with the path, name and number
View Replies
ADVERTISEMENT
Aug 5, 2014
I have a table products with a field "id_product" and "total" (Total items in stock)
I have a query with the fields "id_product" and also the field "total in stock"
I want an update query to update the field 'total' in table 'products' with infos from that query
For each id-product in table products, replace the field total with the field 'total in stock' from the query
So I want to update a filed in a specific table with infos form another table.
View 2 Replies
View Related
Dec 16, 2013
How to update data from one table to another table using form.
I have data coming from design team in Database 1 and using form i want search data and assign the job to a person and store it in the database with his name. I have to do this because database from design team is read only.
View 1 Replies
View Related
Sep 20, 2012
I have a table called input and a "form" input made on top of that same table. When I input the data on the form it updates properly no issues.
I have another table main. i update the vendor name using combo box from main.
It works like that.
SELECT main.[Vendor Number], main.[Vendor Name]
FROM main;
And I update the vendor name using control source =vendorname.column(1)
I have even achieved the same thing using DlookUp .
The problem is that it saves on the Form but the data from Dlookup or from comboBox updates for "Vendoe Nmae" is not saved in input table.
View 7 Replies
View Related
Apr 19, 2005
I have a form which has a table as it's Record Source. The problem lies when a bound combobox or bound textbox is changed, the change is noted on the form but when I reference the value of the object it comes back as null. So I look in the table and the field has not changed. But if I requery the form then it takes.
I've never had this happen to me before, is there something I am missing? :confused:
View 3 Replies
View Related
Sep 1, 2005
I need to refresh my mind on something. When I try to update my 'Circuit'
table via my form, I get a message that required fields are not in the table.
I get 'Cannot insert null...into table' It is talking about trying to put a numeric ID key field that is required into the table, but since the record is not added yet the table which is oracle, doesnt have that value. How do I code this so the numeric value needed gets inserted in the table before I go to update the record?
Thanks in advance for any help.
View 1 Replies
View Related
Sep 20, 2005
I want my table to update on my last record entry when I close the form.
Now, I just have docmd.close under the Close button and the last entry didn't make it to the table. What do I need to do?
Thanks.
View 1 Replies
View Related
Jun 9, 2006
I am trying to change all the entrys in a table that contain 0's to 1's when a user clicks a check box on a form. I am using the code below but it keeps erroring can anyone help?
Table is called tblChildren_Details and the Form is called frmBatch
Private Sub Check12_Click()
Dim rsttblChildren_Details As ADODB.Recordset
Dim conDatabase As ADODB.Connection
Dim strSQL As String
Set conDatabase = CurrentDb.Connection
strSQL = "Select * from tblChildren_Details where Batch = '" & 0 & "'"
Set rsttblChildren_Details = New Recordset
rsttblChildren_Details.Open strSQL, conDatabase, adOpenDynamic, adLockOptimistic
With rsttblChildren_Details
Do While Not .EOF
!Batch = 1
.Update
Loop
End With
rsttblChildren_Details.Close
conDatabase.Close
Set rsttblChildren_Details = Nothing
Set conDatabase = Nothing
End Sub
Thanks for any help
View 8 Replies
View Related
Jun 11, 2006
I am very new to access, so please go easy on me. I have created a form with a simple calculation such as a field equaling an addition of two other fields. It calculates fine, but the calculation does not appear in the table view. All other typed fields appear there, but not the calculation.
The problem is that the purpose of the database is for use with a merged document. I need the calculated value to appear in a field in the merged document.
Can someone help me?
Thanks in advance.
View 3 Replies
View Related
Jun 17, 2013
I'm a relative beginner at VBA and I'm trying to use a form to update a table. The form is used to get an agent name, start and end date. When they hit the "update" button, I want to go to the table, select all records where the agent name (called Fullname in the table) matches and the field called "event_date" is between the start and end dates. I have the below code, which isn't working.
Set rst = CurrentDb.OpenRecordset(Table)
rst.MoveFirst
Do While rst.EOF = False
If rst.Fields("Fullname").Value = Me.Agent And Me.StartDate <= rst.Fields("event_date") And rst.Fields("event_date") <= Me.EndDate Then
rst.Edit
rst.Fields("CompleteDate").Value = DATE
rst.Fields("Comments").Value = "Autofilled"
rst.Update
End If
rst.MoveNext
Loop
rst.Close
View 3 Replies
View Related
Feb 19, 2006
hi there
I am having some difficulty with using Access (aren't we all?) ;-(
I have a table with a the following fields: START_DATE, END_DATE, RENTAL_PERIOD, DAILY_COST & TOTAL_COST.
What I am tring to achieve is that when someone fills in the START_DATE, END_DATE & DAILY_COST fields (which update the table behind the form) that the form will take the END from the START and put the result into the RENTAL_PERIOD field and then multiply this by the DAILY_COST value to automatically fill in and display the TOTAL_COST field.
It must be simple but I just can't get it to work and it's stopping me from sleeping :mad: I have found myself doing Access in my dreams which is not good!!
Any tips much appreciated - Thanks
Mike
PS I have written 2 queries which will calculate this for me but dont seem to be able to action the queries from within the form (if that helps!)
View 3 Replies
View Related
Nov 29, 2005
I have a form created from a table and I had to use calculations in some of the fields to automate certain processes. Now, if I pull a report based on the fields in the table - I am getting all except for the fields with the calculations. Is there any way to update the main table - since most of the calculations were done with text boxes?
View 1 Replies
View Related
Apr 6, 2006
i have a form, which is based on query from multiple tables.. in this form i want to add a unbound textbox in the detail section.. whenever a user leaves this records, the system should insert a record in another table with values from this record including this field... how to do this?
the record is from a query where as the field is unbound, still we need to insert the values from record and this field at the same time into another table..
example: i have item master and item production table.... from joining these table i get a query which will give me item A and prod qty .. when i use this query as form datasource, the detail section has these two fields.. now i want to have an unbound field budget.. so i have the followig in detail sectin
item A production qty budget qty
when users enter values in budgetqty field and moves to next recod,, the system should insert into another table xyz values (itemA, production qty, budget Qty)
how to do this..which event will be good.
urgent reply is expected.
View 2 Replies
View Related
Jun 21, 2006
I have a form bound to a table that has a bunch of dates in it. What I want to do, is to be able to have pop-up calendars on the form next to each date field, where the user can select dates from the calendar, then have those dates display on the form, and last but not least, update the date fields in the table.
At the moment, the form I'm working with let's me pick dates from little pop-ups and display the dates, but when I exit the form and then come back into it, the dates are gone! In other words, I'm missing something in the process between the dates displaying onthe form and the dates getting into my table.
If anyone has an idea as to what I might be doing wrong, I wouldappreciate your ideas and suggestions.
Thanks in advance. I don't know where I'd be without this forum!
View 11 Replies
View Related
Feb 28, 2015
I'm making a very basic sales system for my school project and I'm currently working on the stock management part, as I said it's very basic.
My task -When the user receives a stock delivery they need to update the stock numbers. the value they need to update is the StockNumber value in the Products table. to so this I want to make a form that displays all the product names in a table with a textbox or cell next to it in which the user can enter the amount of that item that has been delivered. And at the bottom of the form there is a button which will add all these new values to the existing values.
1. There is no set number of products, the user is able to add new ones, this is preventing me from just making a separate textbox for each existing product
2. I have attached a jpeg I made in paint to illustrate how I want to the form to work as well as my system as it currently stands, there are a few unused forms and queries.
View 2 Replies
View Related
Apr 23, 2015
I've got two tables - one that works like a cypher and one with all my records.
I have 2 queries. One that is a simple query that extracts data that is not so user-friendly and puts it into a user-friendly format. The Other query is for any records that the first query excludes because the new combination of data (lets just call it a code) is not in the cypher table, but needs to be added.
How do a create a form that will show the records in the 'excluded records' query and allow me to select from a drop-down list a specific set of categories to update the cypher table ?
Example :
Record Table: Cypher Table:
Ford Focus = Sedan
Ford F-150 = Truck
Ford Freestyle = Wagon
Ford Escape = SUV
Now a new model comes in, a Ford Edge which is an SUV but is not in my cypher table.
I have the query to pull in the excluded Ford Edge, but I want a form to show "Ford Edge" in the first column and be able to select from a drop-down list "SUV", and either automatically update my cypher table or require me to press a button to update the table (whichever is easier).
View 6 Replies
View Related
Dec 3, 2014
I am looking for updating one record in a table from data on a form.
I have a table called ctntbl with fields: Item, Credit_Amt, and Incd_Num.
I also have a non linked form from which I want to make changes to one specific item in the ctntbl table. The user will enter a number in field FRM_CR_INC which links one specific record in table ctntbl matching field Incd_Num. Then they will enter data in FRM_CR_AMT which I am needing to update just that one record in the table field Credit_Amt with the data in FRM_CR_AMT.
Here is my code:
DoCmd.RunSQL "Update ctntbl set credit_Amt = " & Me!FRM_CR_AMT & " Where Incd_Num = " & Form![FRM_CR_INC]
I am getting a data type mis match error. Cant understand where error is coming from. All fields in table and form are text fields.
View 3 Replies
View Related
Sep 23, 2014
I have a form, which has a search box. This allows you to search through the id numbers of each record. Once an ID has been selected a bound textbox displays the id number. Other unbound textboxes then display other information from the table with the relevant record.
What I want to do is then allow users to change information in textboxes and update the record.
View 7 Replies
View Related
Jan 9, 2014
Still working on the registration and badge print system for their upcoming exhbition the company I do a bit of work for. Managed to solve most of my problems but have got stuck here.
Basically each of the badges have a barcode (code 39) on them which is in the following format...
*1000000123$M*
(*'s required for the barcode to work, the numbers are the badge number and the $M is the enter command (i think))
Basically we need a form that allows us to scan the barcode (the number of the barcode is the Primary Key in the tbl_Attendees), and for this to update the "Attended" (Yes/No) field to yes. This bit I can do with a simple update query, but we need some form of confirmation, something simple like a line of text showing up on the form saying
"Joe Bloggs of Leeds registered as Attended".
View 3 Replies
View Related
Dec 2, 2014
I am working on a shared database. There are two tables in the database.Table1 have all the employee personal information like employee ID, name, nationality, date of birth etc whereas Table2 have the salary information like Basic, HRA etc. The two tables are joined by Employee_ID field.
I have created two forms, Form1 is only based on Table1 whereas Form2 have fields from both Table1 & Table2. The issue is that if I use to enter the data using Form1, the employee_ID is not automatically updated in table2. On the other side If i use to enter a data by using Form2 then everything is working fine. Is there a way to update a field value which is not in form?
View 1 Replies
View Related
May 13, 2014
I have a FORM linked to a table, this is to update the current volume with the volume taken at different levels. Here is the code I used, some how current status Vol is not getting updated in the table and then in the FORM.
Code:
Sub Volume_taken()
Dim dbs As Database
Set dbs = CurrentDb()
dbs.Execute "UPDATE [Login_test] SET [Login_test].[Current status Vol (µl)] = " & _
[Code] ......
View 4 Replies
View Related
Oct 19, 2005
:eek: :eek: :eek: :eek: :eek: :confused: :confused: :confused:
I am trying to update a database table via a command button on the main form, that uses tabbed sub forms.
The database gets its data from paradox data tables copied our company's
third-party software. These table files are copied from one location to another to stop the paradox database from locking up and giving me errors during the import process of this database. I then link to these files at a pre-determined location on a local computer hard drive.
When I try to run the code below I get the error about the table being
locked by a user or process. As you can see I have tried adding a pause
incase the files are still being copied but this does not seem to be the
problem.
I have used a msg box to confirm that the copying process has completed before starting the make query, but the same error comes up after I click ok.
Can anyone suggest anything else.
As you can see from the simplicity of the code below I am a beginner so take it easy on me, by not taking knowledge for granted. :)
code:
------------------------------------------------------------
Dim response
Dim stDocName As String
Dim stLinkCriteria As String
response = MsgBox("Are you sure that you want to update xxx with Customer
data from xxx?", vbYesNo, "Perform Update")
If response = vbYes Then
‘pause software to let any pending work to be completed
Sleep (5000)
‘close active form
DoCmd.Close
‘close all active forms
Do While Forms.Count > 0
DoCmd.Close acForm, Forms(0).Name
Loop
‘pause software to let any pending work to be completed
Sleep (30000)
‘delete existing file
Kill "c:folderfile DATA.DB"
‘replace with new file
FileCopy "J:Folderew_DATA.DB", " c:folderfile DATA.DB "
‘pause software to let any pending work to be completed
Sleep (40000)
DoCmd.SetWarnings False
stDocName = "Make_DATA"
DoCmd.OpenQuery stDocName, acNormal, acEdit
‘pause software to let any pending work to be completed
Sleep (35000)
stDocName = "Make_DATA_SUMMARY"
DoCmd.OpenQuery stDocName, acNormal, acEdit
‘pause software to let any pending work to be completed
Sleep (35000)
stDocName = "qry_Update_ Status"
DoCmd.OpenQuery stDocName, acNormal, acEdit
‘pause software to let any pending work to be completed
Sleep (35000)
‘open up main form when finsihed
stDocName = "main-form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.SetWarnings True
Else
End If
View 3 Replies
View Related
May 2, 2015
I'll simplify this form to a
- textbox
- command button
- subform (showing a table with 4 fields, including an "EntryID" field but just one record)
What I'm trying to accomplish is to enter a value in the textbox (this value will be one of the EntryIDs in the EntryID field), click the command button, and the subform should refresh itself, showing the record from the table (the 4 fields) which has the same EntryID.
View 2 Replies
View Related
Jul 16, 2015
I have an unbound form in which a user enters data relating to a credit dispute, and when they hit the Save button I have a sub that is intended to insert that data into a table. This is a bit out of my comfort zone, so I found some code from another forum and adjusted it to my needs. However, I'm getting errors.
The table name is tbl_complaints. The fields from the form are:
txtAcctNumber
txtClient
txtEoscarType
txtEoscarControl
cboMethodReceipt
....
My code is below.
Private Sub cmdSave_Click()
Dim StrSql As String
On Error GoTo ErrorHandler
StrSql = "INSERT INTO tbl_complaints " _
& "(ACCT_NUMBER, CLIENT_NAME, EOSCAR_TYPE, EOSCAR_CONTROL_NUMBER, METHOD_OF_RECEIPT,
[Code] ....
The error I get is error number 3075, and it says I'm missing an operator in the section that references cboResponseType, but I can't seem to figure out what I'm missing. My head is spinning from staring at these parentheses and apostrophes for so long.
View 14 Replies
View Related
Oct 12, 2006
I've read over and over that calculated data is bad, that's fine with me... but here is my dillema...
I have four fields that interact with my calculation in a single form. There is only one table in the database.
AmountF (The stored data in the table) (amount financed)
FC (calculated by =[amountf]*.25) (finance charge)
Amount Paid (used in calculation of total due)
total due (calculated by =[amountf]+[fc]-[amount paid])
The math already works, everything works. I can choose to print the form and it looks great. However, I would like for it to (when I'm done printing the form) somehow save the total due data to the AmountF column in the table. AmountF is in the same line as all the other information, so I would like it to not create a new record just update the old one.
All four of these fields have a text box in the form for themselves.
View 4 Replies
View Related
May 19, 2013
I have 6 text box on the form which are unbound. Now we enter the entry in these boxes then I have update button on the form to update the record in table. all fields should be clear after update the records in table so I can enter the new entry.
I am using ms access 2007. Is there any liberary to add?
Form fields
text1
text2
text3
text4
text5
text6
Table fields
emp_id
batchid
training_name
training_hour
start_date
end_date
View 13 Replies
View Related