473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Filtering current record with a tabbed panel

31
Hi

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()
DoCmd.ApplyFilter
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
1 1787
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

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

Similar topics

3
by: David | last post by:
I have a problem that I cannot delete components that are placed on a Tabbed page in Visual Basic.Net 2003. (OS = Windows 2000 Professional) The form uses a Tab Control with several pages. I have...
3
by: Mark V. | last post by:
Here's what I have and I'm stumped. I have a table that has several thousand names and addresses. I only want to send to one address in a household. So what I would like to do is create a new...
0
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
5
by: bbasberg | last post by:
Hello, I want to separate three different groups of fields from one record. Originally I was going to add a button on a form to "drill-down" to more detail is the user wanted to see it. I...
1
by: BarkersIT | last post by:
Hello, i'm pretty inexperienced with Access so this may be obvious to someone. I hope it is. I have been writing a database at work, I started with a few tables and then used the form wizard to...
3
by: paquer | last post by:
On my Main form I have a Command Button that opens a Subform in order to create a new Subform record. At this point I want the subform to show only the new record being created. Not all the...
2
by: PTMech | last post by:
I have a tabbed subform (data sheet view) for which one of the controls is a combo box. It is based on a query that needs to be filtered by the same field data linking the main and sub forms. I...
1
by: Henry Stockbridge | last post by:
Hi, I have a main form (bio info) with a tab control containing three pages (employment, financial and dependent, respectively.) When I move record to record on the main form, the correct...
7
by: HxRLxY | last post by:
I posted a different question (Help with non-static/static problem) which was answered. I changed my inner class to a static nested class, but now I cannot create an object using that class and add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.