Open Filtered Form From Unbound Switchboard

Feb 3, 2005

I get the feeling I'm really missing something glaringly obvious here but I'm struggling.....

I have a combo box on my switchboard that looks up field txtOfficer in a query and then want it to open up a new form containing only those records relating to the officer name selectedtxtOfficer

The rowsource for the combo is:

SELECT DISTINCTROW [qryMain].[txtName] FROM [qryMain];

and the on click event is:

DoCmd.OpenForm "frmFiltered", , , "[txtName] = " & Me.cmbOfficer.Column(0), acFormEdit

When I select a name from the combo I get a parameter box and have to type in the name to open up the filtered records form. How can I get rid of it so the selection is one seamless process? :confused:

View Replies


ADVERTISEMENT

Forms :: Open A Form With Filtered Criteria?

Apr 9, 2014

I'm trying to open a form with filtered criteria using this code:

Code:
DoCmd.OpenForm "Edit_Mission", acNormal, , "[Report_Date]=# " & Format(Me.Date, "dd/mm/yyyy") & "# And [Supporter_Name]='" & Me.Supporter & "'"

it used to work on access 2010 but now on access 2013 I get a blank form.

View 2 Replies View Related

Forms :: Open A Report With The Results From A Filtered Form?

Nov 25, 2014

I want to open a report with the results from a filtered form.

I want to use a similar format to the attached Allene Browne search2000 as the base to filter the records initially, but not sure how to get the filtered results into a report and the most efficient way.

View 8 Replies View Related

Modules & VBA :: Open Filtered Form With Record Source Set

Dec 17, 2013

In my Access adp, when I open a certain form (frmVertebrates), the databinding occurs in the Load event for the form, for various reasons. I have not specified any datasource in the form's design view.

Databinding for frmVertebrates:

Code:
Me.Form.RecordSource = "select * from dbo.vertebrates where catalogID=3"

This works great when just opening the form. However, when opening with a filter from a button on another form it won't work, the form displays all records.

Button code:

DoCmd.OpenForm frmVertebrates, , , "vertID=123"

Obviously, this makes sense, since the record source is explicitly set in the Load event.

Is there a way to capture the filter "vertID=123" so it can be added to the Form.RecordSource sql?

When breaking in the Load-code and watching the 'form' variable, I can't spot the filter condition anywhere...

View 4 Replies View Related

Using A Switchboard To Open A Form.

Nov 18, 2004

Ok, quick question.
I am using a switchboard to open my main form, 'frmJobLog'. This main form has a tab control with four tabs. How do open the form to the 4th tab using a command button on the switchboard?

Thanks in advance.

View 4 Replies View Related

Switchboard To Open New Blank Form...

May 30, 2006

Just curious. I'm trying to set up a switchboard to guide users to the right place in my database. I would like to have one button on the switchboard to open a standard form with all the infomation in it already. and then I would like to have a button to open a form that is blank and then adds to the previous form I mentioned.

Any help will be greatly appreciated.

View 2 Replies View Related

Possible To OPEN Switchboard Again When A Form Is Closed

Mar 15, 2013

I would like to have the Switchboard I created open when the database is selected. I used Tools/Startup to set this up. It works to a point. The database window opens and THEN the Switchboard opens (on top of the database window). There are some who I wish not to see the database navigation window). Also, is it possible to OPEN the switchboard again when a Form is closed?

View 1 Replies View Related

Modules & VBA :: Open Report With Subreport Based On Unbound Form

Apr 14, 2015

I am trying to open a report (rptGMX-IRG) that includes a sub-report (srptRG) based on criteria that is set with two unbound fields on a form (frmGMXbook). This form has two dropdown boxes (cboGMX_No & cboMachSize) and a command button. The first dropdown box includes data located in the main form and the second dropdown includes data that is part of the sub-report.

I can get the report to open properly when I enter data into both fields on frmGMXbook.

However, the problem I am having is the inability to have one or both fields be "Like '*'" and show all associated records.

Here is the code I have on the command button.

Private Sub GMX_Preview_Click()
Dim strCriteria As String
If IsNull(Me.cboGMX_No) Then
strCriteria = "[cboGMX_No] Like '*'"
Else
strCriteria = "[GMX_No] ='" & Me.cboGMX_No.Value & "'"

[Code] ....

View 1 Replies View Related

Modules & VBA :: Click Event To Open A Form And Select Record Corresponding To Value In Unbound Text Box

Oct 29, 2013

I have some code for a button on click event to open a form and select the record which corresponds to a value in an unbound text box. The code is:

Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOpenPatientRecord"

[Code] ....

This works fine when I put in a 10 digit NHS number but opens a blank record when I enter a four digit or six character/digit PatientNumber. Both patient number and NHS number are text fields in the underlying table.

View 14 Replies View Related

Switchboard Open On Startup

Mar 8, 2006

Is there i way so that when you open up your database you can get your Switchboard to open up??? is there a simple box to click to make it do this that i am missing or is it some VB code?

Help please thanks alot
l33tskyline aka Chewstar

View 5 Replies View Related

Switchboard Doesn't Open

Oct 11, 2004

I know stupid question. When I open my database I want the switchboard to open automatically, but it doesn't. What do I do to fix this?

Thanks
Biz

View 2 Replies View Related

Open Table From Switchboard

Nov 28, 2004

i'm creating a database which has several switchboards. i have several tables, each saved in the same format with the table name representing the date of the report, for example table 1 is saved as 100204(Oct 2, 2004), and table 2 is 100904, so on and so forth. I have a text box which a user needs to enter the date of the report they want to look at and i need to be able to open the desired table by date entered. I've had a couple of vb classes but haven't used it in a while. can anyone help? thx in advance.

View 2 Replies View Related

How Can I Show Switchboard Only (i.e Access Doesn't Appear To Be Open)

Jul 19, 2005

Hi,
Does anyone know if I can just show the switchboard only so that it looks like a program, or if I can use an existing MDB to create an .exe??

View 2 Replies View Related

Forms :: Open Attachment In Unbound List?

Jun 10, 2014

I have an unbound listbox in my details section of my form and it will display items from the database that I have selected. There are 19 in all. If I double click the row, the edit form pops up. If I right click I can sort the columns. I want to have a single click that allows the user to open the attachment in that list. I am not sure how to code this.

View 2 Replies View Related

Forms :: Open Query Results In Unbound Subform

Oct 28, 2014

I have a main form (start_protocol) with an unbound subform (placeholderform).

Using a button in mainform I open a search form (search_protocol) inside the unbound form, by the code:
-------------------------------------------------------------------
[placeholderform1].Visible = False
[placeholderform].Visible = True
Me.placeholderform.SourceObject = "SEARCH_PROTOCOL"
--------------------------------------------------------------------
The search form (has a run query button) is build from a query named: search_protocol.

I want to be able, as soon as I pass the button, to have the results (from the query) inside the unbound subform, of the main form (Start_protocol).

View 2 Replies View Related

Reports :: Set Unbound Check Box To False On Open Not Working

Dec 3, 2013

I have a report with an unbound checkbox which has a null (greyed out value) when printed. I'm just trying to set it to false when the report opens.I have

Code:
Private Sub Report_Open(Cancel As Integer)
Me.CheckNotPaid = False
End Sub

but it just says 'Runtime Error -214..You can't assign a value to this object'

View 3 Replies View Related

Reports :: A2007 On Win7 - Unbound Report Does Not Open - OK On XP / 2007

Aug 8, 2013

I have an unbound report - which is actually a form for the user to print out if they need one. There is no data on the form.

Here is the code that is run when the Button is Clicked:

'First, I reenable the Access menus so that they can use those to print

DoCmd.OpenReport "TransitionSurveyPaperFormLEA", acViewPreview

When I open the report on XP/Access 2007, it works just fine.

When I open the exact same accdb with a Win7/A2007 machine, the report does not open. If I debug and display the error, a msgbox appears
"The OpenReport action was canceled."

I have other bound reports and those open with XP/A2007 or Win7/A2007 just fine.

It makes me VERY nervous that the same exact ACCDB in A2007 runs differently on different OSs (XP vs Win7).

View 1 Replies View Related

"Ambiguous Name Detected" - Switchboard Won't Open

Sep 27, 2005

Please help!

I've done a search of the forums, the results of which have more-or-less caused me to understand (roughly) what the problem might be and how to locate the code which is causing it. Sadly, I am a bit of a Visual Basic virgin, and I am reluctant to wade right in because if I screw up this database I'll have decimated my company's advertising and marketing strategy (mailouts!).

I was trying to make a command button on a switchboard (which I have done before, but not recently) -- and was taking a bit of a trial-and-error approach. I wanted the button to result in the previewing of a set of mailing labels (which the user would susbsequently print after reviewing). One of my first attempts resulted in the button automatically printing, so I "cut" it, and several close-but-no-cigar attempts follwed, all of which I used the "cut" command to dispose of. The last attempt I made resulted in the following message:
"The expression On Open you entered as the event property setting produced the following error: Ambiguous name detected: Bulletin_Board_labels_Click.
-The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
-There may have been an error evaluating the function, event, or macro."

I "cut" the button I had just created and thought that might fix it. It didn't. I still got the above message whenever I tried to open either this switchboard or the main switchboard. I tried closing down Access and restarting it. Same message, same problem.

Below is the code from the switchboard in question -- the last few entries are the relevant ones: anything to do with "bulletin board" is stuff I was working on. As far as I can tell there are currently no duplicate queries, reports, macros, etc, named "Bulletin Board Labels" (theres is one query named "Bulletin Board Query", and one report named "Bulletin Board Mailout labels", and that's it.)

The code for the switchboard follows...

Please help me resolve this problem?

:confused:
Jennifer
_________________________________________

Option Compare Database
Option Explicit

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click

Dim stDocName As String

stDocName = "All Art Galleries"
DoCmd.OpenReport stDocName, acPreview

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub

Private Sub Command11_Click()

End Sub

Private Sub OLEUnbound22_Click()
Dim strInput As String
strInput = "help.html"
Application.FollowHyperlink strInput, , True
End Sub

Private Sub University_Bigwigs_Click()
On Error GoTo Err_University_Bigwigs_Click

Dim stDocName As String

stDocName = "University Bigwigs Query (VP's, Deans, etc)"
DoCmd.OpenReport stDocName, acPreview

Exit_University_Bigwigs_Click:
Exit Sub

Err_University_Bigwigs_Click:
MsgBox Err.Description
Resume Exit_University_Bigwigs_Click

End Sub
Private Sub Command13_Click()
On Error GoTo Err_Command13_Click

Dim stDocName As String

stDocName = "Invitation Destination Report"
DoCmd.OpenReport stDocName, acPreview

Exit_Command13_Click:
Exit Sub

Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click

End Sub
Private Sub Main_Click()
On Error GoTo Err_Main_Click


DoCmd.Close

Exit_Main_Click:
Exit Sub

Err_Main_Click:
MsgBox Err.Description
Resume Exit_Main_Click

End Sub
Private Sub Help__Click()
On Error GoTo Err_Help__Click

Dim stAppName As String

stAppName = "C:AEAC Mailing list Databasehelp.html"
Call Shell(stAppName, 1)

Exit_Help__Click:
Exit Sub

Err_Help__Click:
MsgBox Err.Description
Resume Exit_Help__Click

End Sub
Private Sub Ref_List_Click()
On Error GoTo Err_Ref_List_Click

Dim stDocName As String

stDocName = "Category/Destination/Receive"
DoCmd.OpenReport stDocName, acPreview

Exit_Ref_List_Click:
Exit Sub

Err_Ref_List_Click:
MsgBox Err.Description
Resume Exit_Ref_List_Click

End Sub
Private Sub Campus_Coverage_Click()
On Error GoTo Err_Campus_Coverage_Click

Dim stDocName As String

stDocName = "Campus Coverage Report"
DoCmd.OpenReport stDocName, acPreview

Exit_Campus_Coverage_Click:
Exit Sub

Err_Campus_Coverage_Click:
MsgBox Err.Description
Resume Exit_Campus_Coverage_Click

End Sub
Private Sub Flyer_Report_Click()
On Error GoTo Err_Flyer_Report_Click

Dim stDocName As String

stDocName = "Flyer Destination Report"
DoCmd.OpenReport stDocName, acPreview

Exit_Flyer_Report_Click:
Exit Sub

Err_Flyer_Report_Click:
MsgBox Err.Description
Resume Exit_Flyer_Report_Click

End Sub
Private Sub Poster_Destination_List_Click()
On Error GoTo Err_Poster_Destination_List_Click

Dim stDocName As String

stDocName = "Poster Destination Report"
DoCmd.OpenReport stDocName, acPreview

Exit_Poster_Destination_List_Click:
Exit Sub

Err_Poster_Destination_List_Click:
MsgBox Err.Description
Resume Exit_Poster_Destination_List_Click

End Sub
Private Sub Currents_Destination_List_Click()
On Error GoTo Err_Currents_Destination_List_Click

Dim stDocName As String

stDocName = "Currents Destination Report"
DoCmd.OpenReport stDocName, acPreview

Exit_Currents_Destination_List_Click:
Exit Sub

Err_Currents_Destination_List_Click:
MsgBox Err.Description
Resume Exit_Currents_Destination_List_Click

End Sub
Private Sub Catalogue_Destination_Click()
On Error GoTo Err_Catalogue_Destination_Click

Dim stDocName As String

stDocName = "Catalogue Destination Report"
DoCmd.OpenReport stDocName, acPreview

Exit_Catalogue_Destination_Click:
Exit Sub

Err_Catalogue_Destination_Click:
MsgBox Err.Description
Resume Exit_Catalogue_Destination_Click

End Sub
Private Sub FlyerMultCopiesButton_Click()
On Error GoTo Err_FlyerMultCopiesButton_Click

Dim stDocName As String

stDocName = "Flyer Multiple Copies Report"
DoCmd.OpenReport stDocName, acPreview

Exit_FlyerMultCopiesButton_Click:
Exit Sub

Err_FlyerMultCopiesButton_Click:
MsgBox Err.Description
Resume Exit_FlyerMultCopiesButton_Click

End Sub
Private Sub InvitatMultCopButton_Click()
On Error GoTo Err_InvitatMultCopButton_Click

Dim stDocName As String

stDocName = "Invitation Multiple Copies Report"
DoCmd.OpenReport stDocName, acPreview

Exit_InvitatMultCopButton_Click:
Exit Sub

Err_InvitatMultCopButton_Click:
MsgBox Err.Description
Resume Exit_InvitatMultCopButton_Click

End Sub
Private Sub CampFlyMultCopButton_Click()
On Error GoTo Err_CampFlyMultCopButton_Click

Dim stDocName As String

stDocName = "Campus Flyer Multiple Copies Query"
DoCmd.OpenReport stDocName, acPreview

Exit_CampFlyMultCopButton_Click:
Exit Sub

Err_CampFlyMultCopButton_Click:
MsgBox Err.Description
Resume Exit_CampFlyMultCopButton_Click

End Sub
Private Sub PostMultCopButton_Click()
On Error GoTo Err_PostMultCopButton_Click

Dim stDocName As String

stDocName = "Poster Multiple Copies Report"
DoCmd.OpenReport stDocName, acPreview

Exit_PostMultCopButton_Click:
Exit Sub

Err_PostMultCopButton_Click:
MsgBox Err.Description
Resume Exit_PostMultCopButton_Click

End Sub
Private Sub Bulletin_Board_labels_Click()
On Error GoTo Err_Bulletin_Board_labels_Click

Dim stDocName As String

stDocName = "Bulletin Board Mailout Labels"
DoCmd.OpenReport stDocName, acNormal

Exit_Bulletin_Board_labels_Click:
Exit Sub

Err_Bulletin_Board_labels_Click:
MsgBox Err.Description
Resume Exit_Bulletin_Board_labels_Click

End Sub
Private Sub Bulletin_Board_labels_Click()
On Error GoTo Err_Bulletin_Board_labels_Click

Dim stDocName As String

stDocName = "Bulletin Board Mailout Labels"
DoCmd.OpenReport stDocName, acPreview

Exit_Bulletin_Board_labels_Click:
Exit Sub

Err_Bulletin_Board_labels_Click:
MsgBox Err.Description
Resume Exit_Bulletin_Board_labels_Click

End Sub
Private Sub Command57_Click()
On Error GoTo Err_Command57_Click


Screen.PreviousControl.SetFocus
DoCmd.FindNext

Exit_Command57_Click:
Exit Sub

Err_Command57_Click:
MsgBox Err.Description
Resume Exit_Command57_Click

End Sub
Private Sub Command58_Click()
On Error GoTo Err_Command58_Click

Dim stDocName As String

stDocName = "Bulletin Board Mailout Labels"
DoCmd.OpenReport stDocName, acPreview

Exit_Command58_Click:
Exit Sub

Err_Command58_Click:
MsgBox Err.Description
Resume Exit_Command58_Click

End Sub

View 5 Replies View Related

Run Form With Filtered Criteria

Jan 27, 2006

Hello all,

I have looked through the forum, found some things, but not sure if they help with what I need specifically. I tried looking at the microsoft website, but can't really follow some of the things they have there.

On clicking a form (called Manager), I would like a list of some fields from a query (called queryMgr) to pop up, so that I can put in the criteria as I would if I just used the query, and then submit or run, and the form gives the filtered results. I don't want users to open the query and put in their criteria, I just want them to go to the form directly

When I click the form, I want the following to pop up at the same time so I can fill in the criteria:

Date
Vendor Number
Invoice Number
Check Received (this is a Yes or No field)

and then when I click submit or enter, the form gives me say 5 records that match this criteria.

Thanks a lot!!!

View 1 Replies View Related

Enter New Record In A Filtered Form

Jan 25, 2005

Hi

I want a filtered pop up form to accept new records.

The archive posting that I found suggested that I insert

[MyForm]![LinkedField] as the default value of the linked field.

Any suggestions gratefully accepted.

Steven811

View 5 Replies View Related

Adding Records To Filtered Form.

Nov 1, 2005

Ok heres the problem, i seem to have a little bit of a mind block at the moment so help would be greratly appreciated.

Basically there are two tables involved, tblBikes (which contains all information on the bikes) and tblHires (which contains all the information about hired bikes) these are linked with a one to many relationship as each bike can be hired out many times.
I have a button on a form containing bike information which opens the hires form filtered by the bike ID of the record selected in the first form. When I add a record to the hires form i need the bikeID to be automatically input into the field.

View 14 Replies View Related

Sorting Form By Filtered Data

Mar 14, 2006

I have a button that opens a second form and shows filtered data based on the selection of a ComboBox from the initial form. That all works nicely, I now wish to sort the Data in the new form by [POID].

The code I'm using looks like this;

Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "FRM_AWMPonum"

stLinkCriteria = "[ClientID]=" & Me![Combo0] & " AND IsNull(DelDate)"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click

End Sub

What changes do I need to make to the code to sort the data?

View 3 Replies View Related

Forms :: Form Filtered By A Query

May 14, 2015

I filter my table with a query - where the Invoiced Date is NULL. In the vba ADD RECORDS code I may INSERT new records which should then also appear - but are not showing up. The records ARE added to the table, but don't show up unless I close the form and reload it and then the query filter picks up the added records.

View 5 Replies View Related

Filtered PopUp Form, Multiple Selection

Jun 16, 2005

Hello,
I am building a sort of property management database, and I have run into a bit of a problem. The database will store information about buildings, leases, maintenance etc..

My problem has to do with units in buildings. The tracking of units was requested near completion of the database, and now I have to somehow incorporate it into the database.

Previously, the user when filling out lease information, simply had to manually fill in the unit numbers. It was just a text box, and the user could input what ever he/she wanted. For example unit:1 or unit:3,4,5 etc.

Now since we want to monitor unit sizes, instead of having the user just manually type it in, we want the user to select actual units.

I have several tables but I think the ones that are of concer here are:

Buildings
Leases
Units
Tenants

Units table right now stores the following:
unitId
buildingName
unitNumber
size
(and others that aren't really important) the unit table will store unit information for all buildings and is related to the buildings by the buildingName

So when viewing unit information on the building form, the units are in a subform, and are filtered by the buildingName. Everything works here.

Now for my problem. What I am looking to do is when a user is entering lease information in, instead of choosing the buildingName from a drop downbox and then just typing in the unit numbers, I would like to have the user select the buildingName from the dropdown box, but then besides the unit field, press a button which will open a popup form, displaying all the unit numbers for that building. Then the user can select which units the lease pertains to (it can be more than one unit), and this will populate the unit field.

I want the popform to look something like this

□ unit 1 □ unit 2
□ unit 3 □ unit 4
□ unit 5 □ unit 5

etc.

I think I know how to filter the form, so that it only displays relavent units to the selected building, but I have no idea how to display multiple records on one page, and allow the selection of multiple records.

Sorry about the long post but I was trying to be really clear in what I am trying to achieve (hopefully it was clear not confusing). Any input you guys might have, is very much appreciated.

Eric

View 1 Replies View Related

Uncheck Checkbox On All Records In Filtered Form

Jan 22, 2006

I have a db with a form showing all customers with communication checkbox checked, I want a button which uncheckes all chackboxes.. all I have now is a button which uncheckes the first record.. anyone an idea?
:confused:

View 3 Replies View Related

Single Number Issue On Filtered Form?

Jul 25, 2006

Hi all,

I have a form (form2) that filters records based on the employee number (in a combo box) that the user selects. At the moment this works fine on double numbers (such as 10, 12, 80 ect) but if I use single numbers it displays to many records. For example if I select Employee 1 it shows all records that start of with the number 1 such as Employees 1082, 11, 1507, 10043.

If I select Employee 1, I only want it to show records for this employee and the same for other single numbers.

Ive posted the database if any one is willing to have a look for me as its difficult to explain it fully, (ive removed irrelevant tables/forms/reports).Form2 is set to startup, Im using access 97

Any ideas on how I can fix this single number issue? :confused:

Thanks

Jim

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved