?
Solved

Tab Control and Record Operations

Posted on 2001-06-17
3
Medium Priority
?
261 Views
Last Modified: 2008-03-06
Using MS Access 2000

i created a form and then place a tab in it. the tab doesn't have buttons for record operations (add, delete, etc.) and record navigation (find next, find precious, etc).

i want my tab to have this capability bec i'm going to place fields (text boxes, combo boxes) in them so that the user can modify the contents of my table.

i tried inlcuding command buttons using the wizard. i'm able to create, say, a save button in the tab -- just that it doesn't actually save anything when clicked.

any advice?
0
Comment
Question by:kiphughes
[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
  • 2
3 Comments
 
LVL 12

Expert Comment

by:Paurths
ID: 6200379
hi Kiphughes,

if u have created the button using the wizard.
select the button, and open the properties window.
Scroll down until u see 'onClick'.  
Put the mouse pointer in it and click. On the right u will see a button with arrow, choose it and it should show 'Eventprocedure'. Select this. Save the form and try your actions again.

cheers
Ricky

ps: might be that the actual naming i used is a little off, since i only have a dutch version.
0
 
LVL 1

Author Comment

by:kiphughes
ID: 6200396
the wizard automatically does that for you. try stepping throught the wizard and u'll see what i mean. the code it generates is this:

Private Sub Save_Click()
On Error GoTo Err_Save_Click


    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_Save_Click:
    Exit Sub

Err_Save_Click:
    MsgBox Err.Description
    Resume Exit_Save_Click
   
End Sub

i don't know what it means. but whatever it is, it doesn't save me stuff.
0
 
LVL 12

Accepted Solution

by:
Paurths earned 80 total points
ID: 6200472
hi kiphughes,

i know the wizard does that for u. But sometimes with tab-elements the code is no longer connected to the button.
U have to make sure that the click-event of the button is shown in the properties window of the button.

try to add a line to the code, to see if it runs the code:

Private Sub Save_Click()

   DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
msgbox "Ok, passed"

end sub

cheers
Ricky


0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

762 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