Forms :: Editing Records Through A Form

Aug 13, 2014

Just a general query about the best approach to take for an editing form.

I want to have two separate forms, one for adding a new record (have completed this) and one for choosing and then editing a selected record.

I have seen that people use combo boxes to display a list of records with fields. This seems quite difficult to use. Maybe that's the best way though?

How do you apply an edit button to a selected record in this type of situation? I suppose really I need a box that has a list of records with a little edit button next to each one, or can I do something that launches the edit form as soon as you click on a specific record?

View Replies


ADVERTISEMENT

Editing Records With Forms

Oct 24, 2005

Hi everybody,

I have a large problem which I can't figure out (well 2 actually but the other is less important):

1) I have a form which brings up the results of a search performed by the user (only contains some fields). From this list of results i would like the user to be able to a) see a full report of that Record (which I've done ok) and b) edit the data contained in that Record.

My results form opens the editing form no problems, however, i cannot edit any of the data contained within it. This only occurs when the results form is open as well so i guess it's because there are two instances of those fields open simultaneously. However, I am reluctant to close the results form because the results will be lost.

2) I've tried several methods to open the form at the desired record:
- using the WHERE condition argument of the OpenForm function
- creating a filter in the editing form that runs in the OnOpen event
These two require the creation of a variable (I'm using the Key field) that is inserted into these bits of code. However, all of my attempts thus far have been unsuccessful; every time it asks for the Parameter in a popup. I've defined the variable as a Public variable in a seperate module but don't really understand this aspect partcularly well; I'm obviously missing something.
- the form currently opens from it's own query that gets the Key Field Criteria form a hidden control on the results form.

Here is my code for the 'Edit' button:

Public stProjectID As String

'Results form 'Edit' button click:
Private Sub btnEdit_Click()
stProjectID = txtID2
[Forms]![frmResults].Visible = False
DoCmd.OpenForm "frmProjectEdit", acNormal
End Sub

'Edit' form open:
Private Sub Form_Open(Cancel As Integer)
Me.Filter = "ProjectID = stProjectID"
FilterOn = True
End Sub

Sorry for waffling on...

Thanks in advance for your help.

Bobadopolis

View 2 Replies View Related

Forms :: Subform For Editing And New Records?

Nov 1, 2013

I've got a master form, which is used to search for records, and display links to them in a list box. When the user selects a record, they get the full details of the record on a subform. At the top of the subform, I have two buttons, an edit button, which allows them to make changes to the record, and a "new" button, which allows them to create a new record.

My problem is, after a new record is created, the subform adds a new page. So instead of having record one of 1, it shows record 2 of 2. So if a new record is saved, and the user tries to access another record, nothing appears because the subform stays on record 2 of 2(which is a blank undirtied record). If you press navigation button back it will show the record they selected.

Maybe I could make the new form a pop up form, and pass it parameters rather than making a new form within the subform.

I've tried putting the command DoCmd.GoToRecord , , acPrevious in the subforms Current() method, but I get an error saying I cannot go to the previous record.

View 2 Replies View Related

Help Me With Code For Adding And Editing Records Using Forms.

Jan 29, 2006

Hi,
I have the following situation.
I have a switchboard form which has 2 buttons (Add And Edit)
I have a patient record form, which has 2 fields, (DateRecCaptured and DateRecUpdated)
Both buttons on the switchboard open the Patient Record form (one opens it in Add mode and the other in Edit mode)

This is what should happen.
If I click on the add button on the switchboard, the patient record form should open to allow me to add a record. The system date should then automatically be saved in the DateRecCaptured field.
If i click on the Edit button and edit a record, the system date should be saved in the DateRecUpdated field. If no updates are made, the field shouldn't be updated. If you scroll among records, the DateRecUpdated field shouldn't be updated. When editing, the DateRecCaptured field should remain unchanged.

Thanx

View 1 Replies View Related

Editing Records In A Form

Sep 4, 2005

Hi all
At the moment I have a form which links to a table, one of the columns in the table is called "Description" so the user can input a sentence or two. Basically I when I open this form (in Edit Mode as Im using a Switch Board)it will not allow me to edit a current record.

I can edit a record in the tabel but not in the form.... :eek: .. help

Any help would be superb

Cheers

View 2 Replies View Related

Editing Records In A Form

Oct 25, 2005

I have a very simple form that is populating fields with records from a number of tables (not queries).

I have found that I cannot edit any of the records from the form. Almost all of these fields are NOT key fields. When I click in the field, it simply selects the text in the field, but does not allow me to alter it (typing does nothing...the cursor just blinks). The same thing happens for blank fields.

I know this is a simple question, but I can't find the answer in help or searching this forum. I know it must be a simple setting (I think) somewhere but I've tried a number of settings in properties/forms.

Thanks,

Kelly

View 9 Replies View Related

Forms :: Search Multiple Fields In Table And Open Matching Records For Editing

Dec 10, 2014

Create form to search multiple fields in table

Return records that match search

Open the record that you want in Form View for editing

View 1 Replies View Related

Forms :: Editing Query Fields In A Form

May 1, 2013

I have produced a table, the records from which have to be selected by individuals for auditing purposes.

I created a second table with individuals initials and passwords. This is linked by the initials to the main table. Records on the main table are returned when the query is run.

At first I could not edit fields in the query but changed the recordset type to Dynaset (inconsistent). I am now able to edit the query fields. However, having created a form based on the query, I am unable to edit the fields in the form. This is the basis that the auditors will use to score so is vital. Have I missed any other switches or techniques?

View 6 Replies View Related

Forms :: Form Filter Will Not Accept Editing

Sep 11, 2013

I have a table fed form that will not accept editing to the filter statement.

Currently the filter is [Dealer Name]='ABC Company'

This is causing a problem because we have multiple locations with the same Dealer Name. They do however, have different Primary Account numbers.

I thought to edit the filter to [Primary Account]=102

However, after I save everything and go back to form view, the filter reverts to the original.

View 7 Replies View Related

Forms :: Saving / Editing A Record Using A Form With Combo Box

Jun 24, 2014

I have a form that I need to use to add new clients to a table in my database, lets call it tblClients. On this form I have a combo box which, when selected, will drop down with the first and last names of all clients in tblClients, as well as their Client ID. Once you select a client from the drop down menu, it populates all of the fields in the form with that clients info (Client ID, fname, lname, address, phone number, etc. etc.).

I need two other things on this form: one button that will save or modify whatever current record is currently pulled up, and one button that will start the process for entering a new client, so basically it would blank out all of the fields and fill the Client ID field with the current number +1.

As of right now I have the form made and the combo box works, in that I have 3 dummy clients in the tblClients and when I select each client from the combo box it will populate the fields on the form with the info. I'm using some simple VBA on the combo box such as

Me.FirstName = Me.cboBox.Column(1)

and that seems to all work, but the problem is trying to save/modify data to tblClients. The only record in the actual table that gets modified seems to be the first record. For example, if I pull up client with ID #3 and change his address or phone number, what happens when I click to save the changes it takes client ID #3 record, overrides it with client ID #1, and then client ID #3 is the same as client ID #1 except with the old information. I'm not quite sure why this is happening.

View 4 Replies View Related

Forms :: Lock / Unlock Form AND Subforms From Editing Data

Mar 24, 2014

I have a form with several subforms within (tabbed subforms). I've used the code:

In the Current event of the parent form -

Code:
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False

In the Current event of each of the subforms -

Code: (THIS NEVER WORKS FOR ME - RUNTIME ERROR)
Me.AllowEdits = Me.Parent.AllowEdits
Me.AllowDeletions = Me.Parent.AllowDeletions
Me.AllowAdditions = Me.Parent.AllowAdditions

In the Click event of the button -

Code:
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True

So the main form is locked upon opening and unlocked with the click of an unlock button. How to apply this to the subforms as well. They just stayed unlocked the whole time.

View 14 Replies View Related

Editing Multiple Records At Once...?

Jul 6, 2006

Hey guys,
Does anyone have any ideas as to how you might go about editing multiple records at once? So maybe have a listbox with checkboxes, so you can select items in your DB, then, using a form, edit/set one field for all the selected items. Any ideas?

View 4 Replies View Related

Lock A Table For Editing The Records

May 22, 2007

Hello all,

I have a question, I'm building a MS ACCESS database and within it i have a table for putting in my program critical parameters. I don't want anyone to change the content of that table. That means not editing the 1 record in it and not adding a new record. Within the program is't a problem but if you make an other blanc database you can import the table, change it and export it back into the program (i know it is far looking but it happens).

How can i lock a table so it cannot change or it cannot be exported or imported???

View 2 Replies View Related

Prevent The User From Editing Records

May 8, 2005

Hey guys..

is there any way in which i can prevent the user operating a form from adding or deleting or editing any records ?

View 10 Replies View Related

Forms :: Switching Form From Data Entry Only To Data Editing

Feb 18, 2015

My aim is to have my forms open to a new record, which I have done, but if my users need to then update or edit data in previous entries, they can click a button that allows this.

My thoughts were to add a button, then put in code so that the necessary properties changed the form from displaying a new record or records entered since opening it, to showing all records in the associated table....

As an example there is a table for purchase orders. When clicking on this from the main menu form, it opens up the purchase order form to create a brand new PO. At times though, we will need to revisit an order to attach a copy of an invoice, or update the cost of whatever was purchased.

View 5 Replies View Related

How To Lock Records To Prevent User Editing?

Feb 6, 2008

Good morning! I'm building a database for use by four technicians in a call-center type operation. The call records are purely transactional in nature -- once the call has been logged, the record is closed. If the customer calls again, a new record is opened.

The supervisor doesn't want the techs to be able to go back and edit a record once it's entered -- the records are for quality-control purposes and he doesn't want them gaming the system by going back and changing things after the initial call is logged (let's not discuss the issue of employee psychology, motivation, Office Space, etc.). So I'm trying to figure out how to do that; they all have wheel mice, and I can currently see all the records as I scroll back and forward with my mouse wheel, so I'm assuming they'll be able to, as well.

Any help?

Thanks,
Andreas

View 11 Replies View Related

Display Prevoius Selections In Listbox When Editing Records

Jun 12, 2006

I have two unbound multi-select listboxes that saves selection to their respective table. It works just dandy. However, whenever I go back to the same record, the listbox is blank and apparently I have to instruct it to "retrieve" the previous selection from the table using the PK as criteria.This is far as I can get, though this code causes several errors and I'm not sure what I need to put in as an array for "For Each" statement. If anyone can guide me how to retrieve the old selection from the table and displaying on listbox, that would be great.If IsNull(DLookup("[ClientID]", "[tblClientAccommodations]", "[ClientID]=" & Me.ClientID)) = False Then Dim RecCount As Integer Dim Index As Variant RecCount = DCount("[ClientID]", "[tblClientAccommodations]", "[ClientID]=" & Me.ClientID) For Each Index In Me.lstReasAcc Me.lstReasAcc.Selected = (DLookup("CommunicationID", "[tblClientAccommodations]", "[ClientID]=" & Me.ClientID)) Next iThanks in advance.

View 3 Replies View Related

General :: Lock Archived Records To Prevent Editing?

Dec 12, 2012

I want to lock archive records so that they can't be edited, however I want them available to users for viewing. So for example if the file is "closed" the record can not be changed.

View 5 Replies View Related

Modules & VBA :: Adding And Editing Records From Unbound Fields

Mar 4, 2015

I total novice at VBA. I am trying to code a button to modify (the last) record in a subform list and then add a new record based on values in unrelated or unbound fields on the button form.

The following code is based on the first of two YouTube tutorials (this bit on the edit) and looks like it should work. Except that my Access 2010 with Visual Basic for Aplication v7 does not recognise the type definition Database or Recordset

Code:
Private Sub ANOwner_Click()
Dim cn As Integer
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb

[Code] .....

View 6 Replies View Related

Forms :: Editing A Forms Control Source To Update A Field In A Table

May 28, 2013

I have created a table for installer invoicing, and have a field for invoice amount. I have created a user input form that allows a user to fill in certain pay rates for different aspects of installation, and would like to know how to make the invoice amount a calculated control that will auto update the field InvoiceAmt in my table. I can't figure out how to do this in the property sheet.

View 3 Replies View Related

Forms :: Recordset Viewing / Editing In Forms

Aug 22, 2014

I am trying to create a (normally simple) application, but not having a solid grasp on the concepts of recordsets. The application is serial number tracking for appliances.

The functionality needs to be able to:Search for serial numbers using partial strings (i.e. serial # "T12395723K39" can be located by entering "3K3")

If the serial number does not already exist, allow for adding it.
If data was added erroneously, allow editing to correct it.

The first 2 points are complete but I am struggling with the last. After a user performs a search, I store the results of that search to a temporary table for easy viewing of applicable records.

To allow someone to edit, they simply double click on one of those records to open a seperate form and edit.

When I displayed the content of the temporary table in the form for editing, I found it was not updating the original table.

When I create a separate recordset, using the values of the record selected, the recordset appears to be empty, therefore not displaying the correct record for editing.

My main table name is "SerialNumbers". The code below is triggered when the user double clicks on the desired record to edit.

Private Sub Claim_DblClick(Cancel As Integer)
'************************************************* ********************
'* Subroutine to take values from search results for editing record. *
'************************************************* ********************
'Initializing variables
Dim ClaimNo, ApplianceName, SerialNo, MakeName, ModelNo, sqlstr As String

[Code] .....

View 6 Replies View Related

Editing Tables T Hrough Forms

Sep 20, 2007

I have a problem. I currently have files from our AS400 linked to access through OCBC. I am not able to edit or add any fields to the file through the form or table feature in access. The permissions on the AS400 are set correctly, is there something to change in Access?

Thanks for the help!

View 5 Replies View Related

Forms :: Editing Unbound Listbox

Aug 20, 2013

I want to be able to edit an unbound listbox. The box consists of two cloumn, PersonsName and NoOfDogs. The PesonsName is would be edited from the Contacts form if it needed editing, which is fine as would the number of dogs that they owned. The listbox is on a form that shows how many people are going to an event and how many dogs each person is bringing with them (not always the amount that they own).

When the person says that they are attending an event they may not, at that point know how many dogs they are bringing so the user would update that information later. The easiest place to be able to do that is by editing that coloumn in the listbox. I understand that this means editing the table that feeds that listbox which is fine.

I just want to simply be able to click on the name in the listbox and edit the No Of Dogs for that person.

View 4 Replies View Related

Forms :: How To Open VB Editing Screen

Jul 11, 2013

When I right click the command button to build the event, how can I go to VB editing screen(b.pdf) instead of access interface (a.pdf)

View 2 Replies View Related

Form For Editing Only

Mar 24, 2006

I set my form in Design view to Allow Edits but not Additions, and when I switch it to (or open it in) Form view, all the combo and text boxes and buttons disappear (the background color and header are all that's left).

All I want to do is edit existing records through the combo boxes. How can I correct this?

View 4 Replies View Related

Forms :: Editing Record Details Not Allowed

Sep 28, 2014

I have had a form working for ages. It has a main form and eight subforms at the bottom of the form. The main form can be edited in all fields.

I have taken a copy, modified the form added new fields to the main source table and updated the query that feeds the form.

Now (in the copy environment) it won't allow me to edit any of the fields. All of the form control properties are the same as the working model (in the live environment) I can run the query by itself and all is OK

There is obviously some little control that I have inadvertently changed and can't see it.

View 1 Replies View Related







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