473,804 Members | 3,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering current record with a tabbed panel

31 New Member
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_Esti mates_Click()
DoCmd.ApplyFilt er
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 1811
PrMaDaImSp
1 New Member
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.RunComman d 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
2733
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 a Panel on the page and then some combo boxes, labels and text boxes. For some reason, I cannot delete any of these controls from the form (not even the Tab control istelf). The Delete and Cut options in the right click menu have been ghosted...
3
4687
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 column that runs a macro or whatever it takes to flag records so they are housholded. Some records have a Father and son at the same address, so I would only want to generate a count in my query that gives me one record for that household, a head of...
0
3650
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 datagrid on the left side that lists names and perhaps a couple of other key fields. The user can click on a record in the datagrid, which should automatically pull up details on that record in the various text boxes and other controls on the right...
5
1435
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 relatively new at Access and VBA but have other IT experience. I stumbled upon the tab control that gives a very nice tabbed look that people intuitively know how to use. I went ahead and created three nice-looking subforms and then assembled them into...
1
1865
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 create forms. I have edited these forms with a bti of VBA to add some buttons. However the number of forms was becoming too large so I created a new tabbed form and wanted to incorporate all the forms under tabs instead. When the new tabbed...
3
5389
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 records the subform's table has. I cannot put the subform as Data Entry because I cannot print the main form & subform together if the subform is "data entry". (comes up blank every time)
2
2922
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 get a parameter entry box which asks for the value and then retains that value when the parent form records are scrolled thru. I have created a specific query fort the combobox recordsource and have tried several modifications to the WHERE part of...
1
1736
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 information is displayed on the tabbed subform. However, when I go to, say, the fourth record on the main form, and click a different page on the tab control, the main form record reverts back to the first record. Any help you can lend would be...
7
2234
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 it to the JTabbedPane. I get a 'cannot find symbol' error, and it points to the pane.addTab method. The program works fine when I remove the nested class and make it a separate class, then instantiate it. Any help would be greatly appreciated. ...
0
9589
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9163
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3000
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.