By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,433 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

Filtering current record with a tabbed panel

P: 31

I am using Access 2007

I have a form called frmProjects and a tabbed panel on it.

The first tab is Project Details, the Second is Lump Sum Estimate and the third is Percentage Estimate

My problem is on the Percentage estimates panel which has a couple of subforms with requery and refresh functions to update changes. After these occur the whole form reverts to the first record.

On the Project Details tab I created a button to filter the current record and this effectively locks the current record when editing on the Percentage Estimate Tab. The button uses an embedded macro.

I would like to automate this by attaching code or an embedded macro to the Percentage Estimate Tab. However, using the same settings as the button does not work. How can I do this?

I have tried a macro in the On click event and a procedure as follows:

Private Sub Percentage_Estimates_Click()
End Sub

Similarly, when clicking the Project Details tab I would like the filter to be cleared but still remain at the same record.
Nov 12 '08 #1
Share this Question
Share on Google+
1 Reply

P: 1
Not sure if this will help you but...

The users want to print only one record (current record) of many with the same tool number. I setup a temporary string to hold a bookmark. Then change my filter to display only the record the user wants to print. After sending the print job I change the filter back to my original filter (all records with the same tool number). Then I assign the temporary string back to the bookmark property which takes me back to the record the user was viewing when they clicked the print button. There is a flicker because Access jumps from the first record back to the bookmarked record. I included the code I use.

Dim tmpBookmark As String
tmpBookmark = Me.Bookmark
Me.Filter = "[Toolindex]= " & currentToolid & " AND [PicIndex]= " & Me.PicIndex
Me.FilterOn = True
DoCmd.RunCommand acCmdPrint
Me.Filter = "[Toolindex]= " & currentToolid
Me.FilterOn = True
Me.Bookmark = tmpBookmark

Hope this can help you. Perhaps someone else has another way(no flicker)?
Nov 13 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.