Forms :: Using Combobox Value To Copy Whole Record?

Dec 3, 2014

Let's say, I'm updating a record, and I have a combo-box that says transfer and another combo-box that states "where to?" - or words to those effect.

Each record has a field for credit value and a field for debit value.

When I've finished entering the current record, I want to run code that fires the event, so, copies all the data from one record, to create a new record, BUT...

1) changes the "where to" from the old record to "From" in the new record.
2) changes either the credit or debit value, to the opposite in the new record?

I would like to do this from a sub-form. I can copy a whole record, no problem, but can't seem to change field values.

View Replies


ADVERTISEMENT

Forms :: Copy Record From Previous Field If No Specific Combobox Value

Oct 30, 2013

I have an access form that needs filling in daily by various people.

It's to document changes to a website and I currently have a combobox box set up for the various sections to state whether they are AMENDS, REVERTS or NO CHANGE.

I have set conditional formatting to then highlight these sections but am also trying to get it to work so that if the user chooses "NO CHANGE" then the data for that field copies over from the previous record.

I have set this up in the AfterUpdate code for the combobox, but nothing is happening, not even an error....

Code:
Private Sub COMBOBOX1_AfterUpdate()
If Me.COMBOBOX1 = 3 Then
Me.[FIELD_TO_CHANGE] = DLookup("[FIELD_TO_CHANGE]", "tb_TABLE", "[ID]=Forms![form_FORM]![ID]-1")
End If
End Sub

(Where 3 is the value of NO CHANGE in the combobox, and FIELD_TO_CHANGE, tb_TABLE and form_FORM being the names of the various elements)...

View 1 Replies View Related

Forms :: Select Record From Combobox List And Have Record Populate In Subform

Sep 16, 2013

I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.

View 8 Replies View Related

Forms :: Click Record In Listbox And Combobox Jumps To Same Record?

Aug 25, 2014

I have been looking for days on the net for my listbox problem. It is there and found a few, even on this forum. but when i try the solutions mentioned i am in a total loss and do not know what to change to make it work for me.

I have a form named A/B Retriever with a record source qry input AB Bins Than i have a unbound combobox with row source qry input AB Bins. This populates 8 textboxes with B through I carton boxes, stored in a bin. The user selects a Bin location from the combobox and can put a "x" in a textbox to illustrate that the box is empty. This works perfect.

Underneath the input bin and box part i have 8 listboxes that shows a query that has counted the empty boxes with the corresponding bin location. this also works. but the question from users where, If i click on a, lets say empty B-box at Bin location 12A20, they want the combobox automatically focus on the combobox with the corresponding Bin location. This is a quick way for them to delete a empty box (remove the X).

View 1 Replies View Related

Forms :: Copy Existing Record To New Record?

Dec 24, 2013

I have the employee data record... I want copy of the same record to insert in table but with different employee id and Site through forms. StaffNo is the primary key.

For example

existing record
StaffNo, Site, Name, hiring date, etc
AKA-111, 10, John, 25-10-13

new record
StaffNo, Site, Name, hiring date, etc
ALM-123, 14, John, 25-10-13

View 13 Replies View Related

Forms :: How To Copy Fields From 1 Record To The Next

Aug 6, 2013

I have fields on a form for the Date, the Start time and the Finish time. These won't change for the next 120 records. So, upon opening a new record, I'd like the Date and times to appear there already. But here is the crux: After about 120 entries, the date and Time changes, for the next 120 entries. So, once the 'batch' is finished, or I close access, the values do not need to be remembered until I enter a new record.

I copied something like the following from a book and tried running it with various modifications, just for the Date to start with, but no luck. (It did strike me as too simple for something, clearly, as unbelievably TRICKY as my problem...) I did find quite a few posts on this here but none seemed to work for me, or made sense to me in the slightest. (I did mention that I'm a complete rookie, didn't I?)

Private Sub Acquired_date_AfterUpdate()
Me!Acquired_date.DefaultValue = "'" & Me!Acquired_date.Value & "'"
End Sub

View 7 Replies View Related

Forms :: Copy From Previous Record?

Jun 2, 2015

I found and pasted some code which copies records from the previous record on the form. Seems to work well, but I was wondering if there is an issue with the copying of the first field which is a combo box?

View 10 Replies View Related

Forms :: Copy Data To New Record

Jul 4, 2014

Currently I have created a data base and form. I am at a point where I need to copy data from one record specific field to a different field in the new record all while creating a new record.

Create a new record

Copy field in LastWeekInfo current record
to
New record ThisWeekinfo field

View 3 Replies View Related

Forms :: Copy Record Within The Subsorm

Mar 26, 2014

I have uploaded a small database. I keep track of payments for people who receive a language proficiency allowance. Usually the members receive this allowance for two years. Sometimes they receive it for one year.

Lang Level DateQuaFrom DateQuaTo DatePd From DatePd To
Hindi Inter 15-Dec-12 14-Dec-14 15-Dec-12 14-Dec-13
Hindi Inter 15-Dec-12 14-Dec-14 15-Dec-13 14-Dec-14

There is a field called NoOfPays . If this field value is 2 in the first record then I want it to insert a second record as shown above. How do I do it. I tried to append but it is not working.

Now copying the record with the maxID is not correct.

View 7 Replies View Related

Forms :: Copy Record Button - Command Or Action Isn't Available?

Jan 13, 2014

I've rebooted my copy record button and just used the macro wizard for now, it seems to work as far as I can tell but there is something strange about it.

I've added in some text boxes so I've got some confirmation, but when I click this copy button I get the following error;

"The command or action 'RecordsGoToNew' isn't available now."

View 1 Replies View Related

Forms :: Copy Record Data To Another Table Through Form

Aug 1, 2014

I have a form with 2 subforms, each based on their own table. One displays categories of invoices (e.g. rent, electricity, etc.) including some details like monthly costs.

I would like users to be able to select one of those categories and copy this to another table, after which they can enter on what date the invoice was paid, to make a history of payments.

At first I based fields in the history table on fields in the categories table so that you could simply pick a category from a combobox. I had an after update event on that combobox that also automatically set the 'costs' combobox to the matching price.

Worked fine, but had one snag: if I update the costs of a category in the categories table (e.g. the rent goes up) then all the costs in the history table was also updated because the fields got their info from that table.

So now I no longer have field from the history table based on the other table, and want to use 'set value' to copy values from one table to the other. I'd like the user to be able to somehow select a category with a single click on a button, and getting the info for that category copied. However, how can I get access to know from which record I want the fields copied?

Or is there a completely different way to get a history of payments that works much better?

View 4 Replies View Related

Forms :: Copy Data From Record In SubformA To SubformB?

Apr 22, 2013

I would like my users to be able to view stock items in one (sub)form and when they double click on an item, then certain data is copied to an orders (sub)form.

I have therefore embedded two unbound subforms into a master form.

The master form (Frm Stock) has no fields, but it has 2 subforms.

Frm_Stock_Subform and Frm_OrderDetail_Subform

So I have 2 problems here.

Problem 1:I would like the following code trigger when the user double clicks anywhere on the record that the user wants to order.Thus far, I can only make it fire only when the user doubl;es clicks in a specific field (in this case, the ID field is the trigger)

Problem 2:I cannot activate the Frm_OrderDetail_Subform in order to create the new record. (I have looked at this link - Refer to form and subform

Code:
Private Sub ID_DblClick(Cancel As Integer)
On Error GoTo Err_ID_DblClick
Dim MyOrderID As Variant
Dim MyStockID As Variant
Dim MyAmt As Variant

[code]....

View 3 Replies View Related

Forms :: Copy Record On Form Based On Combo Box?

Mar 31, 2014

I have a form that i input information into. I have a combo box labeled Addendum, you can select "yes" or "no". What i would like to do is if user selects "yes" then a new record needs to be copied with exact information form original, with the excpetion of a field labeled "tape review #" 1403310000 for example. "-AD" needs to be added to this new record after the review number. Also the field "tape review #" is indexed not to allow duplicate numbers.

View 1 Replies View Related

Forms :: Go To Record Based On Combobox Selection?

Jan 13, 2015

it's easy to set up a form with a combobox that will list all records and moves the user to the selected record. But I can't figure out how to just show a selection of the records in this combobox, instead of all records.

So, to use the example used in most online tutorials: a drop down menu shows you all the names in a customer database. However, I'd like to have instead a dropdown menu with an overview of all surnames in the database and that I move to the first record with the selected surname.

View 1 Replies View Related

Forms :: VBA In Unbound ComboBox To Bring Up Record?

Dec 2, 2013

I have a form with subforms, where the main form's source is a table called tblCharts. Within this table there is a field called ID that is autonumbered.

So I created a combo box that's row source is a query that selects the ID field from table charts and two other descriptive fields to make navigation easier. Limit List is set to yes.

The problem comes up with code that I've used multiple times, but not with an autonumber. The code typicallly looks like this when I'm searching on a text field.

Code:
Sub cboPatientSelection_AfterUpdate ()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboPatientSelection) Then
If Me.Dirty Then
Me.Dirty = False

[Code] ....

This worked at first but then 3070 runtime error came up, the form started messing up. So I made this code

Code:
Sub cboPatientSelection_AfterUpdate ()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboPatientSelection) Then
If Me.Dirty Then
Me.Dirty = False

[code].....

This code worked at first, so I decided to make a copy of my form called Copy Of frmCharts. After this the code stopped working on the initial frmCharts but now works on the copy.

I also received other errors besides 2070. I know what error 3070 is but I can't figure out why it's not working on this form. I closed and opened the form a few times and it happened to start working. Very frustrating when I'm trying to make the system reliable for others to use

The code only seems to do this when I enter design view then switch back to form view.

View 11 Replies View Related

Forms :: Timestamp Record After Update Event And Copy Data Into Another Form?

Oct 2, 2014

I have a simple data entry form on which there are about 30 to 40 data fields to be update by users. One of the field is called "Stage" which is a combo box with 2 entries "Formal Case" and "Informal Case" with no default value whien a form is first opened.

Users will normally create a data entry which updates the table and save.

However if in future users open any one existing record and try to change Stage field from Informal to Formal or vice a versa I would then like this action to

1) update a time stamp concatinated with the stage change value in a text field perhaps

2) save/close the form

3) open a new form with all the existing entries(plus changed status of "Stage Field") with a new record ID and new time stamp.

View 1 Replies View Related

Forms :: How To Copy Unbound Text Box On Form To A Current Record In Table

May 17, 2015

I created an unbound text box on a form that automatically pulls the current logged in user by using this:

Private Sub Txtuser_Click()
Me.Txtuser = Environ("Username")

The form grabbs the logged in user with no problems, however, I ultimately want this information to also end up in my table. So the form has three boxes (to keep it simple). The user will type their first name and last name manually on the form which the record source is this "table" where their name goes to the table last name =Field 1 and first name=Field 2 respectively. I want the unbound box from the form to place the logged in user in Field 3 for the current record.

View 5 Replies View Related

Forms :: Creating A Form Which Copy Selective Entries From Previous Record

Dec 10, 2013

I am tasked with creating a scientific database of fish catches at various different sampling stations. I envisage the entry form having hierarchy levels, ie year, season, date, sample station, species caught, and then the specific associated data with each species (weight, abundance, length etc) will form each distinct record.

In each year there are 2 sampling seasons. In each sampling season there are up to 20 dates on which samples are taken. On each date there are up to 50 sample stations recorded. And at each station up to 20 species can be recorded.

In order to enter each species caught in a survey, the end user will potentially have to fill the season box with an entry 40,000 times. For each season there will be 20,000 date entries to be made. For each date, 1,000 station code entries, and 20 species entries for each station. What I would like to happen is this.

When the end user is entering the data, he or she will be working through the hierarchy from the ground up. Ie., they will enter a particular species' data (abundance, weight, length etc) at a particular station on a particular date during a particular sampling season. The next entry will be a different species at the same station on the same date during the same season. I would like the duplicated information from the previous record to be copied across onto the new one so that all the end user has to do is enter the species name, abundance weight and length data.

Once they have finished entering all the species data for that particular site, they can move onto the next site which they would fill in the data themselves for the station code. So, in the hierarchy, the first button would copy all the previous data except the species name and associated weight length abundance data. The next button would do the same, except leave the station code blank. The next button would leave the species name, station code and date blank. And so on up the hierarchy. The end user would be able to selectively choose which data is copied over by using these buttons, saving lots of potential extra work doing repetitive entries.

View 1 Replies View Related

Forms :: Open Form To New Record / ComboBox Won't Work

Sep 25, 2013

I have a database with a Supply Receipt Form. The first field in the form is a combobox for the user to select a material/supply. I'd like for the form to open to a new record every time. When I use:

DoCmd.GoToRecord , , acNewRec

in the Form On Open property, I lose the ability to select the material/supply. Same thing happens when I set the Data Entry property to Yes.

View 3 Replies View Related

Forms :: Using Combobox In Continuous Subform To Update A Record

Feb 25, 2014

I have a continuous subform of 'static data' whose record source is a SELECT query across multiple linked tables.

Most of the fields are locked and purely there for information purposes but I need to be able to allow end users to change one particular field in each record if they need to - choosing a value from a predetermined list (i.e. one of the tables)

Usually, when I need to do this, I add a command button to the subform and use that to open a separate pop-up form specific to that record, from which the user can make whatever changes they like and then update the record. So in this scenario, a simple unbound combobox linked to that table, on that separate form, would work quite easily.

But I would prefer if users could make their changes directly from the subform without (yet another) pop-up form required each time, to make managing these records more fluid and less time-consuming.

So my thought was to use a bound textbox in the continuous subform (to take the existing value for each record), hide it and overlap it with a visible unbound combobox whose row source is the table of available options and whose default value is driven by the hidden bound textbox. And then to use the AfterUpdate event of the combobox to run the UPDATE query on the record in question.

However, while the combobox is getting the correct default value and the correct list items, I can't make a selection from it. Now I am aware there are 'issues' with using a combobox in a continuous subform but I was hoping I could circumvent them by not binding it.

View 14 Replies View Related

General :: Copy Combobox Selection To Other Table

Jan 10, 2013

I have a table customers, which i can select from an combobox. In my form two tables are bound. one is the customers, and the other is a table where i want to copy the customer information.

I tried this code to copy the selection I made in the combobox afterupdate.

[T_Invoice_firstname] = [T_customer.firstname]

But I get an error 2448 saying I cant assign a value to this object.

I tried msgbox [T_customer.firstname] and i see the name

I tried msgbox [T_invoice.firstname] and i see the empty record

I even filled in a name in the t_invoice.firstname and it shows with the msgbox also.

So I have clearly doing something wrong here.

View 4 Replies View Related

Forms :: Allow User To Enter In Text Into Combobox So That It Saves To That Record?

Aug 5, 2014

How do I allow a user the ability to enter in text into a combo-box so that it saves to that record?

View 6 Replies View Related

Forms :: Adding Value Of Combobox To Hidden Column When User Enters A New Record

Aug 14, 2013

I'm very new to access so I'm not sure about the correct way to go about this. I have a table with a 'category' column, a form which hides the category column, and a combobox to filter the category, let's say R, C, and F.

What I want accomplish is to have the value of the comobox applied to the hidden 'category' column when a user enters a new record into the form.

Is there I way I can get an instance to the record as it's being entered and modify the data using VB? Or would I have to write a sort of pop() function and have it run afterInsert and then modify it that way? Can I even alter the table using VB like this?

View 4 Replies View Related

Forms :: Update Row-source Of Combobox Based On Value Selected On Another ComboBox?

Apr 26, 2015

I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.

Code:

Private Sub Manufacturer_AfterUpdate()
If (Me.Manufacturer.Value = "Siemens") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SeimensTable"
Me.Model.RowSource = "SELECT Model FROM SeimensTable"
Else
If (Me.Manufacturer.Value = "Samsung") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SamsungTable"
Me.Model.RowSource = "SELECT Model FROM SamsungTable"
End If
End If
End Sub

But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?

View 5 Replies View Related

Copy Button In A Form To Copy Fields To Other Fields In The Same Record

Sep 23, 2005

Hi there,

Can someone help me on this issue?

I want to copy Postal Address Information to Visit Address Information wthin the same record, in my Contact Database that I am building at the moment.

I want to copy 4 fields to 4 other fields within the same Record.

This the current code I use for the Copy-button:

---

Private Sub cmdCopyFields_Click()

Dim v1 As Variant
Dim v2 As Variant
Dim v3 As Variant
Dim v4 As Variant


v1 = Me!Field_a.Value
v2 = Me!Field_b.Value
v3 = Me!Field_c.Value
v4 = Me!Field_d.Value


RunCommand acCmdRecordsGoToNew

Me!Field_e = v1
Me!Field_f = v2
Me!Field_g = v3
Me!Field_h = v4


End Sub


---

The underlined part (acCmdRecordsGoToNew) is false part of this code, because it copies the Adress Info to a new record, instead of copying it in the same.

-Is there someone that can help me with this problem, to make the copy-button in the Form run properly?

-Are there other options to achieve te same?

I have put in a attachment, to give you guys a visual example of what I mean.



Thanks in advance,

Quinten

View 3 Replies View Related

Copy Record In DataSheet And Then Jump To New Record

Apr 26, 2007

I am running A Form.
I have created it that I if I Double Click on one of the fields, it automatically creates a copy (which is run from a Query).
That all works fine.
My problem is that my Table has 500 Records and I want the Form to jump straight to the New Record after it creates it.
Here is my Code:
Code:Private Sub USName_DblClick(Cancel As Integer) DoCmd.OpenQuery "Copy_Drug" Me.RequeryEnd Sub

View 2 Replies View Related







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