Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2015, 11:47 AM
Registered User
 
Join Date: Aug 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation How to copy one specific field and past it to all the other records matching field

Hello I am trying to find vba code that would allow me to copy the first record of a table but only at a specific field. And then to paste that data to all the other records matching fields.

I am doing this so there can be a digital signiture the user can enter. I want it to be a form "frmReview" where the user just enters the date in "txtReviewDate" and signature in "txtReviewBy" then clicks a button "btnSubmitReview" and the entered values are pasting into all records in "tblReview". The value of "txtReviewDate" pastes to "ReviewDate" field in "tblReview". And the value of "txtReviewBy" pastes to "ReviewBy" Field in "tblReview".
 
Old August 24th, 2015, 12:30 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

I would use an Update query. You can build it with VBA code and run it.

How will you know which records to update?
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old August 24th, 2015, 01:18 PM
Registered User
 
Join Date: Aug 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I dont think I can do an update query because the 2 fields dont have anything in them. It knows what records to update because I have the 2 fields txt box's in the form using the [Add Existing fields property in the form view] So it starts off at record 1 in the "tblReview" and then when I enter the date and signature, it puts that data on the table.

I am trying to use a code or some thing so I dont have to enter in the same date and signature 20-40 times. I want it so when I click the button "btnSubmitReview" it copys the data from the first records 2 fields "ReviewDate" field in "tblReview", "ReviewBy" Field in "tblReview" to all the records.
 
Old August 24th, 2015, 02:26 PM
Registered User
 
Join Date: Aug 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Solved

I played around with the update queries more and got it figured out. Thanks for the help.
 
Old August 24th, 2015, 04:12 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Thanks for the update.

Great job figuring it out!

Good luck with your project.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update specific field at specific time sanchougule PHP Databases 1 August 12th, 2009 03:16 PM
Field value matching in Access 2003 VBA procedure rgreeco Access VBA 19 May 24th, 2007 08:37 AM
Copy previous field record if next field is null ecampos Access VBA 6 June 23rd, 2006 12:55 PM
Field Specific DISTINCT Statement tdaustin Classic ASP Basics 1 March 30th, 2004 12:06 AM
copy previous field value VBAHole22 Access VBA 1 August 8th, 2003 07:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.