Cut / Paste Field Values To New Record?

Oct 24, 2011

Access 2007/ I am keeping a list of employees in my building. Each employee has a unique record. Each record has all the equipment (computers, phones, printers, etc.) that each employee has in their possession.

To do this, I downloaded the Contacts Management Template from Access and then manipulated it. I've added tabs to the forms for each type of equipment and created all the fields I need. There is one table (Contacts) and there are multiple forms. The data in the forms are populated by queries. One query populates the equipment that is assigned to employees (Contact Details) and the other populates the spare equipment (Building Equipment Details) In the forms, I would like to create a button to cut data from certain fields and put it in the clipboard. I would then like another button to paste the data from the clipboard into the same fields in another record.

Basically, this button would be used if the employee gets a new computer. The old computer should still be tracked, but in the new form for unused equipment. The employee's record would now have blank workstation fields, freeing it up to cut the data from one of the Building Equipment records and paste into the employee's record.

The field names that are in both forms are:

WK Node Name
WK Make
WK Model
WK Bar Code
WK Service Tag
WK IP Address
WK MAC
WK Operating System
WK Value
WK Owner

View Replies


ADVERTISEMENT

Modules & VBA :: Copy / Paste Field From Previous Record

Jun 22, 2013

It is a continuous subform (Names: Form = ClientUpdate / Subform = ClientUpdateSub.

All of the data implicated here is direct and in the subform's query table including the button we want to program.

(This is my example but it wont stay in columns in this "post box" )

IDNo App _ID App_Freq App_Date GetDates Action_Date
22 18 56 21-Jun-13 BUTTON 14-Jun-13
21 19 56 16-Aug-13 BUTTON 9-Aug-13

*

The GetDates Command BUTTON should generate the red data above, like:

Private Sub GetDates_Click()

Go to a new record
Go to the field App_Freq and fill it with:
Copy/paste the data from the field of the same name in the previous record
Go to the field App_Date and fill it with:
data based on this calculation using the PREVIOUS record fields: App_Date + App_Freq (which are days)
Go to the field Action_Date and fill it with:
data based on this calculation: App_Date (of current record now filled out - step above), minus 7 (days).
End Sub

That's it!

All the dates format is set to medium date. An error message should come up in case App_Freq is empty, for example

Also note that the data can be manually changed at any time and should not revert to its last calculation. The button only generate data into a new record.

View 14 Replies View Related

Modules & VBA :: Special Paste By Values - Variable Not Found

Mar 19, 2015

I'm trying to paste the values of worksheet 1 by value. Please see the attached two files.

When I run the code, it indicates that variable ( xlpastevalues) is not defined.

It is not a variable....

Code:
Private Sub Command0_Click()
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open "Your locationmetric_DEV.xls", True, False
With xlApp.activeworkbook.worksheets("Metric summary")
.usedrange.copy
.range("A1").pasteSpecial paste:=xlPasteValues
End With
End Sub

View 1 Replies View Related

Modules & VBA :: Copy And Paste Current Record Only To Excel

Jul 13, 2014

Its been a few years since I used Access, and despite searches I cant find what I'm looking for. I have a VERY simple form, with only one record on it - "address". I have some print buttons which will print that address to different size labels, and some navigation items, but only one actual record - which is "address" (in the table, this address is a MEMO)

I would like to have a command button that when clicked copies the current record, and opens an existing Excel Spreadsheet and pastes that address into (for example) cell C8

Can it be done easily? Is there a DoCmd.TransferSpreadsheet kind of secnario that works with current record only?

View 8 Replies View Related

Any Way To Paste More Than 50 Characters In Text Field?

May 1, 2014

I have a text field on a form and I am trying to paste more than 50 characters (and space) into that field and I get the following message: "The text is too long to be edited.". Is ther a way to increase the paste capacity?

View 1 Replies View Related

Copy / Paste / Rename A Field In Same Form?

Apr 25, 2014

In the Contacts database, in the Report Center form are 5 links on the right pointing to some default reports.I have created several more reports, and want to just copy-n-paste those links and then change the 'Tag' so it will point to my new report.Can you not just copy-n-paste a field within the same form?

View 5 Replies View Related

General :: Copy Single Record In A Table And Paste It Predefined Number Of Times

Sep 25, 2012

I would like to be able to copy a single record in a table and then paste this record a pre-defined number of times 10,20,30 depending on requirements. The reason I need to do this is that I want to set up a number of identical records that can easily be amended into unique records. This will vastly reduce the amount of work and time spent entering records individually.

The only way that I have been able to achieve this is to copy and transfer the master record into Excel, and then copy the row and paste it into a range of cells. Copy the range of cells back from Excel and then paste this range back into the Access table.

This works but is long winded; what I would like to know is is there a simply way of achieving this.

View 3 Replies View Related

General :: Paste MS Word Table Into A Field In Access?

Aug 14, 2012

I'm not sure where this question belongs but I need to give users the ability to create a small table in MSWord or another program, and then paste the table into a data field. An image of the table would be fine. But it needs to be user friendly.

If that's not possible they could just create a Rich Text document with text formatted in a table form with out gridlines. I would need about a 2000 character limit. Not sure if this is reasonable or not??

View 6 Replies View Related

Modules & VBA :: Create Unique Reference Number Based On Field Values For Record

Jun 18, 2015

I want Access to automatically generate a reference number for a record based on the values in on two other fields for a given record using a form.

The first field is called Operation Number.

The second is Bag Number.

The reference number needs to be in this format: 19C.3.1

Where 19C is the Operation Number, 3 is the bag number, and 1 is automatically generated. Additionally I need the last number --the automatically generated one--to go back to 1 if with each new bag number.

This is kind of like library catalog numbers. Not sure how to do this.

View 2 Replies View Related

Forms :: Cut / Copy / Paste - Activating Mouse Functions In A Field?

Aug 8, 2013

How do I activate functions mouse functions in a field? I want to click the right key of the mouse when I'm in a field within a form so I can cut, copy, and paste.

View 2 Replies View Related

Tables :: Copy And Paste Text Field To Multiple Records

Aug 10, 2015

I have been unable to find a simple way to copy a text entry from a Table Field and paste it to multiple records in Datasheet view.The Toolbar 'Paste' procedure copies to the selected record only and I am unaware of how to select multiple records, as per a spreadsheet procedure.

View 2 Replies View Related

Sum Field Values Only If Another Field Values Meet Criteria

Mar 20, 2015

I need for Access only to sum the "hours worked" of my payroll data, only if another field, "pay code" meets a certain criteria.

In Payroll, some codes are used to designate actual hours worked like REG (Regular Hours) and like OTS (Overtime Straight) while other codes are added as "premiums" to these hours and do not mean that you actually worked those hours, like OTP and HOD (Overtime Premium & Holiday Premium). The hours are only added as a reference to the actual hours worked they are attached to. Their units should not be counted as hours worked.

I want Access to 1) Group By Cost Center, 2) Sum "Hours Paid" that are tied to a REG or OTS (only), but 3)Sum the Earnings for all pay types.

Basically, (in excel-like terms: Hours Paid Column= SUMIF of Paycode = REG OR OTS. But Earnings Amount Column= Sum of all Paycodes)

Cost Center
Job Type
Hours Paid
Pay Code
Earnings Amount

20530
Security Guard II
7.5
REG
190.37

[Code] .....

View 14 Replies View Related

Forms :: Allowing Different Values In One Field Depending On Selected Values Of Another

Nov 22, 2013

I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list.I came up with using the .rowsource keyword. My syntax seems to be fine but I'm not getting any values under the result fields when I run the form.Here is my code so far:

Private Sub Test1_AfterUpdate()
If Me.Test1 = "Stress Echo" Or Me.Test1 = "Stress SPECT" Or Me.Test1 = "Stress PET" Or Me.Test1 = "Stress MRI" Then
Me.Test1Result2.RowSourceType = "Value List"
Me.Test1Result3.RowSourceType = "Value List"

[code]...

View 14 Replies View Related

Queries :: Rename Field Values With Values From Another Table

Mar 2, 2015

I have two tables.descriptions I'd like to relate and use to find/replace in bulk.

[Checking].[Description] (with the source data)
[Rename].[NewDescription] (with the correct data)

I'd like the values in [Checking].[Description] to be replaced with the values in [Rename].[NewDescription], including those that are "Like".

Examples:
[Checking].[Description] = Geico 12345
[Rename].[NewDescription] = Geico

[Checking].[Description] = Geic
[Rename].[NewDescription] = Geico

View 4 Replies View Related

Tables :: Auto Fill Values In New Record With Data From Previous Record

Apr 29, 2015

How to fill values in a new record with data from previous record?

I've total 11 columns in a table and values in 3 4 columns are repeating for few rows before it needs to be changed eventually. I want to fill these rows with values from previous record.

View 10 Replies View Related

Limit A Field To User Defied Values Depending On The Input Of Another Field.

Nov 23, 2005

Hey all,

I have two fields 1 & 2

field 1 is a simple combo list of user defined values ie A, B, C or D

Field 2 relates to a attribute of the data in field 1 and is not always the same for A, B, C and D. i.e

A could have a,b,c,d or e
B could have c,e,f,g or h
C could have a,g,h,i or j
D could have v,w,x,y or z

I would field 2 to have a combo box which only displays a,b,c,d, or e when A is chosen in field 1; c,e,f,g or h when B is chosen; etc

How do I do this?

Cheers all,

Matt :confused:

View 2 Replies View Related

Tables :: Linking Multiple Field Values To A Field Selected From Combo Box

Feb 16, 2014

I'm pretty good with setting up a very simple database such as inventory, profiles, etc.. However I'm creating a database to keep track of a football (soccer) team's players and match statistics.What I have so farsample attached)

Tables:
* Players - PlayerID, Fname, Lname, position, goals, assists, etc (all details regarding a player)
* Position - Positons (Table containing positions eg: defender. Data is selected in player's form as a combo-box)
* Competition - Competition types (Cup, League, Friendly. Data is selected in Match's form as a combo-box
* Venue - similar to Competition table
* Opponent - Similar to above two tables
* Match - MatchID, Competition, Venue, etc (form corresponding to table attached)

Forms:
* Player form
* Match form

Now as shown in the sample, I choose players using the combo-box. Then whatever stats they had during the match are entered on the fields provided. How to link the player (selected using combo box) to the stat fields (goals, assist, YC, etc).

View 1 Replies View Related

Forms :: Insert A Field That Sums Up / Aggregate All Values Of Field

Jul 25, 2014

i want to add a control in that form that sums up and aggregate all the values of field called [amount] based on the value of [Name_Patient] as criteria

View 2 Replies View Related

Editing Field Values That Get Summed Up - Resets Total Field

Apr 7, 2015

I have several fields that I fill in on a form and they all need to add up in the last field. The first way that I tried this worked good for the initial data entry on the form. However if I need to edit one of the fields in the form then it resets the TotalCost field and I have to enter all of the numbers again. Is there some way that I can make this work? Or is this an Access quirk I will have to live with?

I tried to do this two different ways.

Here is the code for the first method:

Option Compare Database
Dim C1 As Long 'For Total Cost
Dim C2 As Long 'For Total Cost
Dim C3 As Long 'For Total Cost
Dim C4 As Long 'For Total Cost

[Code] .....

This way works great the first time that I tried it, I had to re-enter info in all the fields if I wanted to change one.

Here is my second method:

Which didn't work, i received an error message:

"The expression After Update you entered as the event property setting produced the following error: Invalid outside procedure."

And then nothing changes.

Code:
Option Compare Database
Dim C1 As Long 'For Total Cost
Dim C2 As Long 'For Total Cost
Dim C3 As Long 'For Total Cost
Dim C4 As Long 'For Total Cost

[Code] ....

So I know this second method is incorrect.

View 3 Replies View Related

Concatenating Multiple Field Values Into One Field Separated By Commas

Nov 18, 2014

I am trying to create a list of values in a field separated by commas. I have done this in a query as follows:

[Field1]&", "&[Field2]&", "&[Field3] and so on.

However, when Field2 is null, the result is two commas between Field1 and Field2, but I only need one. What function can I use to eliminate the extra commas when fields used in the concatenation are null?

View 10 Replies View Related

Code To Disable A Field Based On The Values Of Another Field

Nov 10, 2005

If I have the following Code to disable a field based on the value of another field:

Private Sub lstAgreementType_AfterUpdate()

If Me.lstAgreementType.Value = "BN" Then
Me.txtSenateAandCDate.Enabled = False
Else
Me.txtSenateAandCDate.Enabled = True
End If

End Sub

But I also need it to disable the field is equal to "BA" or "BT" as well, how would I add that to my code?

View 3 Replies View Related

DLookUp To Divide A Field In One Record By The Same Field In Another Record

Dec 13, 2006

I'm fairly new to setting up Access databases. Been learning a lot. Ran into a snag that I'm hoping you can help me with.

I am using a form to display text labels and running statistics for our jail.

The form, "Complete_Worksheet" gets its data from a query, "qryComplete_Worksheet". Fields that make these up are:

ID (key)
Standard (text)
Outcome Measure (text)
Numerator/Denominator (text)
CalcValue (number)

ID, Standard, Outcome Measure, and Numerator/Denominator are queried from a table, "tblComplete_Worksheet". CalcValue comes from another query, "qryDataSelect". My problem is this:

In the final calculated statistic, some records are numerators and some are denominators. I need one more field, which I have been trying to create as a calculated control on my form which will divide each numerator CalcValue value by the denominator CalcValue value following it. Since these values change constantly as new data is entered into another data table, the calculated control needs to also change with them. I have been attempting to do this using the following expression:

=DLookUp("[CalcValue]","Complete_Worksheet", "[ID]="&"[ID]-1"/[ID]=")

I keep getting a #Error message in the control in form view. When I run the expression in the Immediate window, I get a Compile Error:

Expected: line number or label or statement or end of statement

Any suggestions on how to make this work?

View 9 Replies View Related

Changing Record Values With VB

Mar 19, 2015

I am working on a Reset Password form for a database. The table is called tblUsers and has three fields (ID, Login and Password). The form has a text box where the user can enter in a new password, I already have the code that checks the current password and everything I just can't figure out how to update the password in the table. The textbox is named txtNewPass.

View 3 Replies View Related

Question About Previous Record Values

Jan 9, 2006

How might I go about taking the values fo certain fields in a previous record and place them in the same fields of the current record, using either a query or VBA?

I've seen something about being able to utilize previous record data but for the life of me I can't remember where I saw it!!

Any help is appreciated.

View 5 Replies View Related

Queries :: Concatenating Values Into One Record

May 14, 2013

I am trying to concatenate 2 unique values which are parts of 2 identical rows(records) in order to have only 1 row(record) with concatenated field where the values are unique. For illustration here is what I need to achieve :

Initial table:
Fld1 Fld2 Fld3 Fld4
AAA XXX BBB CCC
AAA YYY BBB CCC

Final Table:
Fld1_____Fld2______Fld3__ Fld4
AAA____XXX,YYY___BBB___CCC

View 1 Replies View Related

Over Type Values To Create New Record?

Feb 16, 2012

I'm looking to record bets and winnings for multiple accounts with a running balance for each account and a running grand total. On the face of it a spreadsheet seemed to be the answer but I need to create a history of bets placed and winnings received. The friend, for whom I'm doing this, wants to be able to overtype current values to create new records. There must also be a facility to create new accounts.

Account A has an opening balance of £135.00 and the other accounts each have their own balances.

A bet of £100 is placed against Account A i.e. a debit, so the balance is now £35.00. Subsequently, a win of £150.00 is received of £150 so the balance is now £185.

Each bet should, I think, have an effective date and an inactive date. Current records will have an effective date but the inactive date will be null. Completed bets will have both an effective date and an inactive date.

Wins only need a date created date.I need to display the account name, current bet, winning amount and balance on the same row - using a form? When the form is opened there will be a column of account names, a column of current bets, a column of winnings and a column of balances.

If there is a current bet then that value should be shown in the appropriate text box. When a win is received the user should type that value in the 'Win' text box and a new Win record should be created with today's date. The inactive date of the current bet should be updated to today's date.

Now the Current_Bet text box should be empty as should the Winning text box.

The user should now be able to enter a new value in the Current_Bet box and create a new current bet record with an effective date of today and a null inactive date.

How can I populate the Current_Bet box with the value of the current record, make the changes described above and use the same text box to enter new values and create new records.

Essentially the form would look pretty much a spreadsheet where the user can just overtype values but a history of changes has to be recorded and the balance isn't just the sum of the displayed values because if it was then each time values were overtyped the balance would change and would take no account of the history.

View 1 Replies View Related







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