Solved

Determine End of record and Beginning of Record from Macro Builder

Posted on 2011-02-17
12
683 Views
Last Modified: 2013-11-27
I have a need to determine the BOR and EOR from within the Macro builder environment. The Form I am using has the Previous and Next buttons which work fine until you get to EOR or BOR. I have read the other thread which solves the problem via coding, however I was hoping for a solution using just the Macro Builder.

I have included the Previous Button Macro as an Image.

Cheers

Jono
Macro-Builder.bmp
0
Comment
Question by:CruiserNut
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
12 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34927073
Please explain *clearly* what you mean by:
"determine the BOR and EOR"
In what context?

Are you looking to simply move to the last field of a record?
Or are you actually trying to find the very last character in the last field of a record.

Also clearly state the reason for needing to do this.

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34927091
Or do you mean EOF.
(End Of File)

Meaning the last record in the table???

I can only see this being done easily with VBA, not macros...
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 34933291
Macros can only do so much.  If you need to iterate through a recordset, using BOF and/or EOF, you need to write VBA code.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:CruiserNut
ID: 34935086
I am wanting to navigate through a recordset and when I reach the last record the form then returns to the first record. And in to the last record when the first record is reached.

My reason for using macros and not VBA is due to my lact of knowledge in VBA. I do want to learn VBA at some stage, I just haven't had the need to.

May I ask to be stepped through using VBA to solve my current question.

Thank you in advance.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34957890
<I am wanting to navigate through a recordset and when I reach the last record the form then returns to the first record. And in to the last record when the first record is reached. >
This would create a non-standard, counter-intuitive user interface.

Typically when the last record is reached, clicking the Next Record button, will create a new record, not move you back the the first record.
...Either that or a simple message is displayed: "You have reached the last record"

The same is true when navigating to the first record, simply display a message.

In either case, this is much easier to be done in VBA than with a macro.

Let us know
0
 

Author Comment

by:CruiserNut
ID: 35008132
Sorry for the delay in replying, I work on a mine site and our internet has been down for a week... Anyway, I am happy to perform the necessary operations in VBA if I can be directed by or shown were I can get the information from to be able to do this.

Thanks
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35009627
Any info I post will be specific to my post above, http:#a34957890, not your original request.

How would you like to proceed?
0
 

Author Comment

by:CruiserNut
ID: 35036775
>Any info I post will be specific to my post above, http:#a34957890, not your original request.

After rethinking my plans, having a message to indicate first and last records will work quite well.
If you could direct me, boag2000, that would be fantastic.

cheers
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35039805
I'll post something tonight
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 35104924
You will have to abandon Macros and use VBA.

Note that after you reach the last record, you will move to a new record (this is the form's default functionality), so you will get the message about being at the end of the records after moving from this "New" record.

Here is a sample
Access-EEQ26830699Message-on-Fir.mdb
0
 

Author Closing Comment

by:CruiserNut
ID: 35219346
Thanks for your help boag2000. Much appreciated.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35222063
;-)
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question