X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Creating Vba Code To Move To Next Record In Subform, Access 2010    
post Apr 8 2019, 10:56 AM

Posts: 17
Joined: 6-March 19

Hi All,

I have a subform (tblBufferListSubform) embedded into my main form (LandingPage). After I enter a record in the subform on LandingPage, I want to be able to click a button on LandingPage that will take me to the next blank space to enter a subsequent record on the subform. Right now, I have to click the down arrow to do this.

I also have the button set to run two queries. I need to hit the down arrow before running the queries or the record I entered into the subform will not take.

Attached is my code on the subform and on Landing Page. Right now, when I click the button, I get a Compile Error: Method or data member not found and it highlights Public Sub MovetoNext() on my subform.

Any help would be appreciated!

Attached File(s)
Attached File  SubForm_Code.PNG ( 5.55K )Number of downloads: 0
Attached File  LandingPage_Code.PNG ( 11.33K )Number of downloads: 0
Go to the top of the page
post Apr 8 2019, 11:17 AM

Access Wiki and Forums Moderator
Posts: 75,705
Joined: 19-June 07
From: SunnySandyEggo

Hi. You're code looks okay, probably just need a small tweak. Can you post a sample/demo to try out?

Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
post Apr 26 2019, 04:48 AM

UtterAccess VIP
Posts: 4,722
Joined: 5-June 07
From: UK

This should work as well

runcommand acCmdRecordsGoToNext

for a new record

runcommand acCmdRecordsGoToNew

Dave (Male)

(Gemma was my dog)
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    16th July 2019 - 03:27 PM