help with command buttons and vb

octatyan

Registered User.
Local time
Today, 06:43
Joined
Jan 10, 2003
Messages
36
Hi, I have a problem with a form.

I have a command button for CREATE NEW RECORD, SAVE NEW RECORD, and CANCEL NEW RECORD (I have not displayed the default record navigation buttons).

When the form loads, only CREATE NEW RECORD is visible. Once this button is clicked, CREATE NEW RECORD is invisible and the other two buttons appear. Once the new record is either SAVEd or CANCELed, the SAVE and CANCEL button are invisible and the CREATE button becomes visible again.

Here's the problem:
I also have Record Navigation buttons (<<, <, >, >>) to move between records. If a person goes to the last record using these navigation buttons, the VB code for the CREATE, SAVE, and CANCEL buttons are never run so when adding a new record, the CREATE button still stays visible and the SAVE and CANCEL button don't appear.

How can I solve this problem? Maybe it can be solved with VB, but I'm not sure how. Any help is greatly appreciated. Thanks!
 
I'm thinking I would need to have some VB code that says,

if you are at a new record, then
make CREATE button invisible and make SAVE and CANCEL button visible

but I just need to know what the code is to signify that you are at the very last record (which is the new, blank record)...
something like - recordset.upperbound

I know it's not "recordset.upperbound", but that was just something to give you an idea of what I need. =(
 
If Me.Newrecord Then
etc
 

Users who are viewing this thread

Back
Top Bottom