Solved

Tab Control and Record Operations

Posted on 2001-06-17
3
216 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
  • 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 20 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now