Updating Record Via Form

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 Replies


ADVERTISEMENT

Help With Record Updating Form!?

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

Finding Record To Update In An Updating Form

Jan 4, 2006

I have a form in which old customers can be edited and new customers can be added.
Currently, to edit a customer, the user clicks in the "Last Name" field and then selects EDIT-FIND and types in the last name. The user will then cycle through all customers with that name to select the correct one.
How do I allow a user to begin typing in the last name field and have the name appear? Is there an easier way to do this?

Many thanks.

View 2 Replies View Related

Error Updating Record In Bounded Form

Jun 19, 2005

Hi guys I am creating maintenance form to update and add new records to department table.
But when I try to edit department field in employee table.
(I get the following error.I get same when try to add new record.)

Error:
You cannot add or change a record becasue a related record is required in table department

http://i5.photobucket.com/albums/y1...gdepartment.jpg
==> pic of error errroupdatingdepartment

http://i5.photobucket.com/albums/y1...eletionship.jpg
===> timekeepingreletionship


I be happy if some expert help me how to update and add new record to department table successfully without the above error and without changing the db structure.
Thanks

View 2 Replies View Related

Forms :: Updating Existing Record In A Form

Mar 19, 2014

I'm having difficulty updating an existing record in my form. I can enter a docket number on my form and when i hit my button (Find Docket) it brings up all the customers info (name, date, invoice, vat, total, etc.) What i want to do then is be able to amend/update the record. Just wondering do i need to put vba code in my save button and how to code it and is it similar to my find data code below.

Here is my save function code:

Function SaveData() As Boolean
Dim db As Database
Dim rs As DAO.Recordset

Set db = CurrentDb
Set rs = db.OpenRecordset("Skips Delivered")

[Code] .....

View 6 Replies View Related

Updating Unbound Textbox On Form Per Record Viewed

Jan 23, 2006

Hey, I am trying to figure out how to update an unbound textbox on a form to reflect conditional data in other boxes when each record is viewed (pages works with reports but I cant find something similar with forms). such as if I had an unbound textbox that I want to = firstname+" "+lastname I would want for it to update it every time a user goes to the next record.. I can't seem to figure out a command or method that executes every time someone goes to the next record.. (and Im not too familiar with all the commands that come without a GUI).. thanks for your time

View 4 Replies View Related

Forms :: Updating Record With Form - Category Table

Feb 20, 2015

Here are my tables

Question Table
ID
Question
AnswerID
CategoryID

Answer Table
ID
Answer

Category Table
ID
Category

So my form shows :
Question, Answer, Category

And I can display any existing question and make updates to the question and answer, that works fine. BUT, what I want to do is update which category a question is in. If I change the Category in the form, it updates the 'Category' in the Category table. What I want it to do is update the CategoryID in the question table.

View 2 Replies View Related

Updating Main Form When Deleting Record From Subform Datasheet

Dec 21, 2006

Hi, I have a problem I don't know how to solve it. I have a subform in datasheet view, linked to the main form. There is a running total on the main form based on a dsum on a field of the subform.
When I delete a row on the subform datasheet, the main form calculation is not automatically updated. I had to create a "update" button to do the refresh.
Is there a "on record delete" event available for a datasheet sub form?
Thank you for any help.

View 1 Replies View Related

Forms :: Combo Box On Continuous Form Updating Current Record Only

Jul 29, 2013

Combo box on continuous form should have the control source listed as the field on the form that will be updated. The Row Source, however, is a query that includes 2 things: the field on the form that will be updated (this part will be nonvisible in your form) and the table/query of selections you want to show up in the combo box (visible). Then ensure the Bound column is set to 1 and the Column count is set to 2 with Column Widths as 0";1"

View 1 Replies View Related

Forms :: Datasheet Subform Not Updating From Main Form Add Record?

Jun 23, 2015

I have a navigation tab with 6 sections, of the 6, 5 of them are self-made split view with a form view on top and datasheet on bottom and upon adding records through a command button on form view I would like the datasheets to update.

On other forms it would (I believe) update to the bottom of the datasheet, now on the ones I've been banging my head against it either replaces the top record or doesn't show up unless I switch tabs and switch back. From my searches I assume this is in need of a requery...

View 14 Replies View Related

General :: Show Query Result In Form Textbox Immediately After Updating A Record

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

Updating Record

Feb 21, 2006

Greetings,
I have a form with a subform(sub1) that contains records. Also on the parent form is a subform that contains subtotals of the records on the (sub1) subform. When I add a record to the (sub1) form, I can't get the code to update on the subtotal subform unless I go to another record. what am I missing here?

Thanks!

O

View 3 Replies View Related

Updating Same Record With Two Forms

Jun 26, 2006

Dear all,

Is there any way to update the same record from two forms? The requirement is that in a form I have a checkbox. If I select the checkbox, it will open another form, in which I can update some fields which are of the same record. When I tried, it is updating on another record. Is that possible to do so?

i am attaching a sample db . If anyone knows how to do it, please update the sample db or give me advice.

Thanks

View 1 Replies View Related

Updating A Record Using 2 Tables

Apr 25, 2005

I have one table (call it tblMax) which holds a number designating a maximum amount for items. I have a second table (call it tblItem) which holds the items current inventory, along with several other values about the item. Is there a way to reference fields from both of these tables on one form, AND have the record be able to update? I've used a query to bring them all to one form, but the record is not able to update using that method. The tblMax will be used for reference only, after the initial values are entered. I also tried leaving the form's Control Source blank and typing in Control Sources for each field, but was unable to get that to work. TIA.

View 1 Replies View Related

Updating Current Record

Dec 4, 2006

I am using and UPDATE Sql statement to update a firld in a form to a table. However, I get the message updating 140 records etc. How can I get the SQL/Macro to simply update teh record I am currently working on?

Beeky

View 1 Replies View Related

Autonumber Not Updating Until End Of Record Set

Feb 2, 2012

I constructed a database in access 2007, when you entered a new record the autonumber would be generated once you started typing in values. I have since upgraded it to an SQL back end and now the autonumber does not update until the recordset is completely entered. This is causing me serious problems with my subforms since the record will not update before I need to go to the subform.

View 1 Replies View Related

Updating A Listbox According To The Record You're Viewing

Apr 30, 2005

Hi

I have a database containing 3 tables (for now):
Customers
Orders
Catagories

Now i also have a form with customer information.
In that form is a listbox with a query statement, so that should display wich orders are placed by that customer.

SELECT Orders.[Order-ID], Orders.Description, Orders.Date, Orders.Category FROM Orders WHERE Customer=[Customer-ID];


Now this works for the first costumer record being displayed.
However when i view the next costumer, the listbox still displays the order information from the first customer.

How can i get the listbox to update itself when a diffirent record is viewed?

Thanks in advance

View 4 Replies View Related

Combo Box Updating By Selected Record

Feb 24, 2006

Hi all,

I have created a form to enter downtime information using the fields from downtime table (as follows)

tblDowntimes

fldDowntimeID (PK)
DateOccured
MaterialCode
ShiftID (FK)
LineMachineID (FK)
DTCategoryID (FK)
DTReasonID (FK)

However on the form, LineMachine is taken from the tblLineMachine where LineID and MachineID are FKs. This has a large list of machines as one line can have many machines and a machine may appear on more than one line

So on the form, i would like to select the LineMachineID by inserting fldLineID (which would be a combo box) where the user could select which line e.g. Line1 and then the combo box for the LineMachineID would only display the relevant machines for the entered line instead of all the machines for every line.

I managed to achieve this,but I am experiencing a problem where if, in the Line combo box, i choose a different Line e.g. Line2, the LineMachineID does not then display the machines on Line2, but keeps showing the machines for the line I originally selected (Line 1).

How do I get the LineMachineID combo box to update every time a different line is chosen in the LineID combo box?

Any assistance much appreciated!!

thanx all,

Keji

View 3 Replies View Related

Run Time Error Updating Record -- HELP ! Please....

May 11, 2005

I have an orders Form with a subform for products. In the subform the user selects each product by first selecting the product category from a combo box, which filters the query for the second combo where they selects the product. Once this is done, I need the record to up date, but Access gives a run time error 3058: Index or primary cannt contain a null value.



In this case I belive the key field is the product_id form my 'order_detail_table' where this is a shared key.



I've been beating this to death (it's killing me!!) for a couple of weeks now and got nowhere. Maybe someone out there can have a look and see what my obvious mistake is ... (I've attached a cut down version of db with just tables, query and subform)

Thx.
Kev

View 2 Replies View Related

Updating Record (3251 Error)

Aug 17, 2005

Hi, I've tried everything to get this to work with access. I can get it to work with SQL but unfortunately in this case I can't use SQL. Problem is that when I try and update the record, I get an error saying that the update method is not supported or that the lock is incorrect. It's a 3251 error.

Here's the code I'm using:

Dim dbConn2 As ADODB.Connection
Dim dbRst2 As ADODB.Recordset

Set dbConn2 = New ADODB.Connection
dbConn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= R:myAccessDB.mdb"

Set dbRst2 = New ADODB.Recordset

dbRst2.CursorLocation = adUseClient
dbRst2.CursorType = adOpenDynamic
dbRst2.LockType = adLockOptimistic

Set dbRst2 = dbConn2.Execute("Select ROAD_ID FROM GIS_MSLINK_ROADID WHERE MSLINK" & " = " & UserForm2.slsn_textbox1.Value)

dbRst2.Fields("ROAD_ID").Value = UserForm2.slsn_textbox2.Value

dbRst2.Close
dbConn2.Close

Set dbRst2 = Nothing
Set dbConn2 = Nothing

View 9 Replies View Related

Updating Record Using Check Box Group

Jan 19, 2007

Hi, ive got a form which requires a user to select atleast 1 option for a check box group.

when i pass the results of the form to access all of the checkboxes in the group are update although not all were selected by the user.

what can be causing this problem. The values are being passed to the correct fields in the DB but it still updates across the board.

Thanks

View 1 Replies View Related

Forms :: Updating Record From Textbox

Oct 8, 2014

I have a form (frmHourEnter) with a textbox (Week_No_Calc) which has a calculation, in Control Source, based on another textbox. After exiting from Week_No_Calc how can I get a field (Week_No) in table (tblHourEnter) to be updated with the calculated value?

View 6 Replies View Related

Error In Updating Record In Table

Jan 1, 2015

I have a separate button to update the record, but when I run or click the cmdUpdate button it gives me an error;

Code below is the one I'm working thru.

Private Sub cmdUpdate_Click()
strSQL1 = "UPDATE tblAMHMace " & _
" SET ReferenceNo=" & Me.txtReferenceNo & "'" & _
", DateLog='" & Me.txtDate & "'" & _
", DocType='" & Me.txtDocType & "'" & _

[Code] ......

View 6 Replies View Related

Updating Subform Creates New Record In Parrent

Jan 12, 2007

I have a form that has a main for, a subform, and then another subform inside the 1st subform. The form works like this:


Conact info
--->Call info and notes
---> Orders worked


Each of those being nested as they appear. The problem is, the user usually jumps strait to putting the order number in "Orders worked" before entering in any notes or info... So no record exists in it's parent form to tie to. How can I have the database create a new record in its parent form when the user types in the subform?

Thanks!

View 1 Replies View Related

Updating A Field Based On Previous Record

Apr 3, 2008

I'm trying to update an imported table from an excel spreadsheet with missing details. The table's records are in order so I just need to fill in a blank field with data based on the previous one as shown.


ID Name Location
1 Bob London
2 Larry
3 Harry
4 Jerry Glasgow
5 Paul
6 John Southampton


I need to fill in the location blanks simply with the last location details, so records 2 and 3 with London and 5 with Glasgow. Is this easily done or would I need to pull all the data into an array and work on it there?

I've tried searching for an answer but haven't had any luck.

View 1 Replies View Related

Updating A Number Field When One Record Is Deleted

Oct 5, 2004

In access (2003) I am setting up a table with Employee # (Pri. Key), senority numbers..and
so on. However I cannot figure out how to reset the senority numbers when one leaves. For example Bob is #235 senority and leaves (By retiring, quits or gets fired)..well Mary was #236 and now should be #235 (because Bob is no longer at the company)..and so on with everyone else below Bob getting their Senority number changed by one.>
Do you have any ideas..I tried autonumber, but it will not do that.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved