UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Copy First Record Down On Subform, Access 2016    
 
   
ollyhutsy
post Nov 8 2019, 03:59 AM
Post#1



Posts: 66
Joined: 16-October 19
From: United Kingdom


I am currently trying to create a button which will copy the first line of a grn number into the remaining records in a subform. This is because items which are received are normally booked in at the same time, but not always. I am wanting to be able to click a button to copy the grn record in the first line down for the remaining records.

Private Sub CopyDown()
With Me.[supptrn subform3].Form.RecordsetClone
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
.Edit
![GRN] = ![GRN]
.Update
.MoveNext
Wend
End With
End Sub
Go to the top of the page
 
 
Start new topic
Replies
ollyhutsy
post Nov 8 2019, 05:16 AM
Post#2



Posts: 66
Joined: 16-October 19
From: United Kingdom


Solved using the following code for anyone with a similar issue

Dim A As String
Dim B As String
Dim C As String
A = [supptrn subform3]![GRN]
B = [supptrn subform3]![Booked In By]
C = [supptrn subform3]![Date In]
With Me.[supptrn subform3].Form.RecordsetClone
If Not (.BOF And .EOF) Then .MoveFirst
While Not .EOF
.Edit
![GRN] = A
![Booked In By] = B
![Date In] = C
.Update
.MoveNext
Wend
End With
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    21st January 2020 - 01:36 AM