Hi - In Access 2000, I'm trying to create a switchboard so users can open a certain form with different filters. I thought I would use an option group with toggle buttons. I suppose it could be just a series of command buttons instead. Either way, I can't figure out the code to get Access to both open a form and filter it at the same time.
Part of my trouble is also that the terms I need to filter on are multiple words, and I'm really confused about how to correctly refer to things with multiple words that are separated by spaces when I'm working in VB -- when to use [], or _, or " ", etc.
The form is called BID LIST.
The filter is on a control called Status2. The options are:
1. Bid Accepted
2. Submitted Budgetary Bid
3. No Bid
4. Bid Rejected
5. Bid in Process
6. Bid Submitted
7. ...and of course, 'no filter' is another option. (In other words, just open the form).
I tried making just one command button to open the "Bid Submitted" version of the form. Using the command button wizard, I first created the button to open the BID LIST form. This is the code I got: Private Sub Command13_Click ()
On Error GoTo Err_Command13_C lick Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "BID LIST"
DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command13_ Click:Exit Sub Err_Command13_C lick: MsgBox Err.Description
Resume Exit_Command13_ Click End Sub Then I had the code I've used in the past to create filtering option buttons within a form: BID_List.Filter = "Status2 = Bid Submitted"
BID_List.Filter On = True Of course, I don't know how to deal with the two words Bid Submitted that are already within a quotation-marked statement... ??
And I couldn't figure out where to insert these two lines in the larger mess of code for opening the form. I tried: Private Sub Command13_Click ()
On Error GoTo Err_Command13_C lick Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "BID LIST"
DoCmd.OpenForm stDocName, , , stLinkCriteria
BID_List.Filter = "Status2 = [Bid Submitted]"
BID_List.Filter On = True Exit_Command13_ Click: Exit Sub Err_Command13_C lick:MsgBox Err.Description
Resume Exit_Command13_ Click End Sub ...but I got an error message when I tried out the button ("Object Required"). I have no idea whether the error has to do with the wording, placement, or punctuation of the code I inserted.
Any ideas?
Angi
9 2316 ADezii 8,834
Recognized Expert Expert
Hi - In Access 2000, I'm trying to create a switchboard so users can open a certain form with different filters. I thought I would use an option group with toggle buttons. I suppose it could be just a series of command buttons instead. Either way, I can't figure out the code to get Access to both open a form and filter it at the same time.
Part of my trouble is also that the terms I need to filter on are multiple words, and I'm really confused about how to correctly refer to things with multiple words that are separated by spaces when I'm working in VB -- when to use [], or _, or " ", etc.
The form is called BID LIST.
The filter is on a control called Status2. The options are:
1. Bid Accepted
2. Submitted Budgetary Bid
3. No Bid
4. Bid Rejected
5. Bid in Process
6. Bid Submitted
7. ...and of course, 'no filter' is another option. (In other words, just open the form).
I tried making just one command button to open the "Bid Submitted" version of the form. Using the command button wizard, I first created the button to open the BID LIST form. This is the code I got: Private Sub Command13_Click ()
On Error GoTo Err_Command13_C lick Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "BID LIST"
DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command13_ Click:Exit Sub Err_Command13_C lick: MsgBox Err.Description
Resume Exit_Command13_ Click End Sub Then I had the code I've used in the past to create filtering option buttons within a form: BID_List.Filter = "Status2 = Bid Submitted"
BID_List.Filter On = True Of course, I don't know how to deal with the two words Bid Submitted that are already within a quotation-marked statement... ??
And I couldn't figure out where to insert these two lines in the larger mess of code for opening the form. I tried: Private Sub Command13_Click ()
On Error GoTo Err_Command13_C lick Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "BID LIST"
DoCmd.OpenForm stDocName, , , stLinkCriteria
BID_List.Filter = "Status2 = [Bid Submitted]"
BID_List.Filter On = True Exit_Command13_ Click: Exit Sub Err_Command13_C lick:MsgBox Err.Description
Resume Exit_Command13_ Click End Sub ...but I got an error message when I tried out the button ("Object Required"). I have no idea whether the error has to do with the wording, placement, or punctuation of the code I inserted.
Any ideas?
Angi
-
BID_List.Filter = "[Status2] = 'Bid Submitted'"
-
BID_List.FilterOn = True
-
BID_List.Filter = "[Status2] = 'Bid Submitted'"
-
BID_List.FilterOn = True
Thanks, but I'm still having the error problem. My form is called BID LIST, but I noticed that when I type BID_LIST.Filter , the program insists on automatically changing LIST to List. Maybe this is the problem. Is there any way to make it stop changing this?
Angi
ADezii 8,834
Recognized Expert Expert
Thanks, but I'm still having the error problem. My form is called BID LIST, but I noticed that when I type BID_LIST.Filter , the program insists on automatically changing LIST to List. Maybe this is the problem. Is there any way to make it stop changing this?
Angi
I'll try to duplicate the problem and get back to you.
ADezii 8,834
Recognized Expert Expert
Thanks, but I'm still having the error problem. My form is called BID LIST, but I noticed that when I type BID_LIST.Filter , the program insists on automatically changing LIST to List. Maybe this is the problem. Is there any way to make it stop changing this?
Angi
-
If your Form is called BID LIST, then:
-
Forms![BID List].Filter = "[Status2] = 'Bid Submitted'"
-
Forms![BID List].FilterOn = True
-
OR
-
Me.Filter = "[Status2] = 'Bid Submitted'"
-
Me.FilterOn = True
-
If your Form is called BID LIST, then:
-
Forms![BID List].Filter = "[Status2] = 'Bid Submitted'"
-
Forms![BID List].FilterOn = True
-
OR
-
Me.Filter = "[Status2] = 'Bid Submitted'"
-
Me.FilterOn = True
Thanks for your help! That did it.
Patty
ADezii 8,834
Recognized Expert Expert
Thanks for your help! That did it.
Patty
You're welcome, Patty.
mshmyob 904
Recognized Expert Contributor
From Angi to Patty - neat trick (lol)
You're welcome, Patty.
ADezii 8,834
Recognized Expert Expert
From Angi to Patty - neat trick (lol)
After almost 3,000 Posts, the names sort of all blend in together. (LOL).
After almost 3,000 Posts, the names sort of all blend in together. (LOL).
Oh well... I'll answer to both.
Angi, aka Patty
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: MVM |
last post by:
Hi everyone,
I am working on an Access project (ADP). I have a switchboard form setup to
allow the user to open up another form by entering search criteria in a text
box and clicking a command button. Then the form opens using input
parameters and grabbing the data in the switchboard text box. My question
is this, how do I grab the data from the switchboard form and put a wildcard
on both ends of the data when passed to the input...
|
by: Craig Brown |
last post by:
I would like to open selected (Filtered) records in a form. I
currnetly have a custom menu but would like to only open certain
records from i.e
Button 1 will open Site 1
Button 2 will open Site 2
Etc
|
by: Martin Dennett |
last post by:
Hi
I'm new to this group so go easy on me!
I currently use a database that has had one constant niggle for a while and
I was wondering if anybody can help sort it out. From an opening screen
there is an option to search for a particular record. The search criteria is
entered into a text box. A form is presented over the top of the opening
screen with the query results and an option is then given for another
search. This results in the...
|
by: Don Sealer |
last post by:
I have a report that includes 5 different subreports. I'd like to be
able to open this report using a date function (Start Date and End Date).
I'd like all five subreports to show the data from those dates. I have
learned how to use this start/end function but I can't figure out how to use
it with these subreports. Right now the report opens but asks for start/end
dates for each of the five reports. Is there a way I can input one set of...
|
by: Don Sealer |
last post by:
I have a report that includes 5 different subreports. I'd like to be
able to open this report using a date function (Start Date and End Date).
I'd like all five subreports to show the data from those dates. I have
learned how to use this start/end function but I can't figure out how to use
it with these subreports. Right now the report opens but asks for start/end
dates for each of the five reports. Is there a way I can input one set of...
| |
by: Andy P via AccessMonster.com |
last post by:
I am responsible for maintaining our departmental intranet pages at work. I
would like to put a link from our website to a MS Access database which is
held on our Network drive.
The problem I have is that if Access has the startup properties set to
display a form, MS Access doesn't start (it appears in the processes window
in task manager but not in applications). If I change the startup properties
so that no form is opened and the...
|
by: Emily Jones |
last post by:
Very strange one this.
Application written in Access 2000. Runs in 2003 at client's site, 2000 on
my development system. FE/BE system.
The app's startup form sets a few options, opens the switchboard, then
closes. Each of the buttons on the Switchboard opens a form (or report). The
Switchboard stays open in the background.
One is a 'View Courses' form. This presents a list of educational courses,
|
by: Scott.McCoid |
last post by:
I'm sure this is an easy one that I can't solve, but I want an action
in one form to reset my TimerInterval on my switchboard (a separate
form). I tried the code below without success. Any suggestions?
Me.!!TimerInterval = 10000
|
by: TADEL714 |
last post by:
I am trying to open a form based on the record set of the current form. The form I am opening should filtered based on a text field and a date field. The code I am using is as follows:
Private Sub Command100_Click()
If Not Me.NewRecord Then
DoCmd.OpenForm "FrmPulls", , , "='" & Me!TEXT & "'" And "=#" & Me!DATE & "#", , acWindowNormal
End If
End Sub
When I run the code I receive the error message "Run-time error '13': Type mismatch"....
|
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,...
|
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...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |