Filter Combox On Subform Value From Another

Oct 12, 2005

I ve searched these forums but cant for the life of me find the answer althought there are a lot of posts on combo box filters.

I have MainForm based on tblStaff. I have SubForm based on tblTimesheet.

They are linked by StaffID.

The user selects a Project from ProjectID in the Subform which is filtered to only show Projects assigned to that user. This is done by filtering the combo box by StaffID from the MainForm. Works no problem.

The problem i have is in the next combobox which displays the potential activities for the user. As there are about 80 potential activities i want to filter this based on the Project Role. There are only 5 project roles. I can refer to the project role in either the SubForm query or the ProjectID combobox query but it doesnt work.

I hope this is coherent. Could anyone suggest some code or query parameters for this!?? I'm not an idiot but im beginning to wonder.

Thanks in advance

View Replies


ADVERTISEMENT

Combox Filter Then Lock Record

Oct 10, 2005

Hi

I have a combo box to select a record on a form.

I would like then record to lock once it is selected via the combox box and the combo box to clear.

If a records is slected again from the combo box it will then show the new record and lock it again.

The problem is users are sometimes using the mouse button to scroll and moving to a different records by accident.

Thanks

View 6 Replies View Related

How To Filter Records Based On Selection Of Combox Box

Jun 29, 2005

Hi every body. I got bounded form as picture below. Initially the form loads all the recod.
I want add a feture to this form so that when i make 4 combo box selection it goes and
load those records that matches that crieteria only . All my controles are in the main form.
I am not using form and subform.I be happy if some one show me how i can switch from show all
mode to filtered mode.(an example higly appretiated)Thanks


http://i5.photobucket.com/albums/y180/method007/comboboxfilter.jpg
( form pic)

View 1 Replies View Related

Combox Box With Subform

Feb 8, 2006

Hi,
I've a unbound combox field in main form, which upon select the subform should display the information. I tried this code but it gives me an error :

Dim strSQLSF As String

strSQLSF = " SELECT * FROM UT_table_EOM_UT "
strSQLSF = strSQLSF & " WHERE UT_Table_EOM_UT.Expr7 = '" & UTEOM_SEL & "'"

Me.UT_Table_EOM_UT_subform.Form.RecordSource = strSQLSF
Me.Requery

Run-time error 2001
You canceled the previous operations

View 5 Replies View Related

Combox Value Populates Subform

Nov 15, 2006

Hello,

I have a simple question with an answer that hides relentlessly from me. I have a combo box on the main form called cboProjects. I also have a subform called SubProjectsDetails. I'm trying to get it to where if a user selects a project from the combo box, the details show up in the subform. The relationships are good and working, and if I add a Find Record button on the form, that works as well. I just don't know the code to dynamically populate the subform with combo box values.

Anyone have any tips?

Thanks

View 2 Replies View Related

Input Value By Combox Only

Jan 10, 2006

Hi,

In MS Access, the form,

I make one combox, I want anybody input the value by dropdown list, they cannot input the value by typing in keyboard.

How can I lock to enter the value by typing, but they can input it by dropdown list.

Because, if I lock the field, then we never enter the value, if no lock, then we can enter it either dropdown list option or type in keyboard.

I just want to make dropdown list option to enter the value.

Please let me know, thanks.

View 3 Replies View Related

Transfer Value From Combox To Textbox

Jun 22, 2006

hi, umm im tring to copy values from a combobox into a textbox so that multilpe values can be saved on the databse.

the textbox it linked to a table, and the combobox uses sql quries 2 get data from a table... i have a command button which then inserts the vaule from the combobox to the textbox.

in the commmand button the vba code used is:
textbox.value = combobox.value

but this only insert one value to the text box i want multiple value one after the other. it just keeps replace the value which is already in the textbox i want it to add on 2 the value in the textbox...

can any1 help me out?
thank you 4 ur time!
purejoker!

View 5 Replies View Related

Combo To Filter Subform From Another Subform?

Feb 2, 2015

Main form frmSiteDetails

frmRooms (subform) holds Room information for the rooms on each floor. This form has LinkMasterField [SlaveFloorsID] and LinkChildFields [FloorsID]

frmFloors subform holds floor information for each floor in a property. This form has LinkMaster [SiteID] and LinkChildFields [SiteID]

Both these forms sit on a Tab Control (TabCtl57) and do work properly.

What I would like to do is to also have a Combo to pick a floor number from frmFloors and filter frmRooms. Both these forms have FloorsID fields. This would save a user having to go back to frmFloors to pick a different floor and then go back to frmRooms to view the room data for the new chosen floor.

View 2 Replies View Related

Help With A Subform Filter

Aug 8, 2005

I am relitively new to access but I am learning ;)

I am creating a database that will hold details of hand held scanners that are sent out to various customers. This records the product and serial number etc. I have got the products and supplier tabs that I have specified on the 1st form "end_user" working fine and put in some basic error checking such as locking fields.
The orders form is to show all the orders that were placed by a particular customer, refered to by "end_user_number (autonumber) primary key" and "end_user_description (Text)"
I can now add orders to the database fine and have managed to get the subform to refresh and show details of the newly added order by tagging the requery command onto the end of the save button, so the record gets saved and then the subform refreshed.
The problem: I just cannot figure what I am doing wrong! The subform in order history displays all the orders from all the users where I want to filter the orders that the current end_user_number is related to. I have tried using the child filter and master filter with no luck and am trying to code a VB line to filter instead (currently a temporary command button on the ordershistory subform) but I am not sure of the syntax. Any ideas greatfully recieved!
:)


Code Attached

View 9 Replies View Related

Filter Subform

Aug 22, 2005

How do you filter the subform so that it only returns data regarding the current week ending and no data before this date.

Many thanks,

Andy :confused:

View 1 Replies View Related

Filter On Subform

May 10, 2005

I have a unbound form with a bound datasheet subform on. I want to be able to change the filter on the subform from the main form i.e. on the click of a command button.

The problem I am having is setting the filter on the subform from the main form using VB. The subform does not seem to show up in the forms collection.

Any help would be much appreciated.

Thanks

View 2 Replies View Related

Subform Wont Filter

Jan 19, 2006

Hi all,

i have a subform as part of a larger form used for entering grades.

the form references a table with grades for all terms, im trying to get the form to just display the grades for this term which is identified by a field: ExamId = JsGrades2 using the filter option in the properties box for the form.

I dont have a filter applied to the main form and ive tried putting the filter on the table instead but either way doesn't work.

i could do a query and reference the table but would like to know why i cant the get the filter field to work.

cheers

greg

View 2 Replies View Related

Filter A Subform Using A Combo Box

Mar 9, 2006

I have a form with a combo box on it.

I want to use the combo box to query a subform.

So basically when you click on the record in the combo box it will filter the subform based on the selection.

Is there is a simple way or do I need to be more specific about the requirements ?

Any help would be greatly appreciated.

Domble

View 2 Replies View Related

Forms :: Filter SubForm Using Like?

Apr 7, 2014

I am trying to apply a filter to a subform using the text filter Like "*text*" by setting up a dynamic SQL query for the subform, see code. The issue I have is that the SQL doesn't seem to apply to the form because it isn't filtering the form.

Code:
If Not IsNull(Me.ID) Then
pubRecCountPubs = 0
Dim strSQL, strSelectText, strWhereText, strOrderText, strFilterText, strAuthorText As String

[Code]....

I have this working fine in a 2010 database using the DoCmd.ApplyFilter method, but need to set up a similar database using 2003 and DoCmd.ApplyFilter doesn't work with subforms and I can't figure out why this code isn't working.

View 7 Replies View Related

How To Filter Subform OnLoad

Mar 20, 2014

I have a subform inside of a form. The form has info about an entire group of parts and the subform contains a list of all the parts in that group. What I want to do is just filter out the parts in the subform whenever the form/subform loads which do not have a 'deleted' checkbox checked. (No parts in the database get deleted; if someone deletes a part I just want it to add a true to the 'deleted' flag field for the part and then that part doesnt show up in regular part lists anymore).

View 1 Replies View Related

Form Filter Not Working In Subform

Aug 8, 2005

platform : access (adp) / sql server
Problem : form filter not executing in subforms

When I goto one of my subforms I can activate the form filter.
When executing the form filter no records show up, it just keeps showing my criteria. When disactivating the form filter I receive an error message telling that my view must be misspelled (it's about spaces). My view is called Vw_people , as a record source it works fine so it can't be misspelled.

Is the problem the adp connection or the subform? I don't know

View 1 Replies View Related

Filter Main Form From Subform

Nov 16, 2005

I have a main form that contains basic project information, and one of many subforms that contains project manager and contract information. (forms and subs linked by project ID) My project managers want to have the ability to only show project records that are theirs. I can make a filter based on any field in the main form without a problem using code like below.

Dim strFilter As String
strFilter = "ILFID Like '*FME*'"
Me.Filter = strFilter
Me.FilterOn = True

How do I write a filter to reference the project manager field in a subform that will actually filter the main form and subform records?

Thanks!

View 7 Replies View Related

Filter Subform Based On Combo Box

Dec 13, 2005

Hello everyone!

I think I am asking the impossible, but can't think why it can't be done!

Here's the dilema:

I am working with an unbound form to search a Mobile Register.

On the form I have an unbound combo box which looks up User details from a table (LKP_User).

When I select a user, I want the subform below to filter all the details for that user and show me which mobiles they have.

PROBLEM:
Combo Box has 3 fields, User_ID, User, Dept_ID. User_ID is bound column but not displayed in combo (only User) is displayed.

I need to link the User_ID with the User_ID on the subform, but don't know how to tell it to look at column 1 of the combo box.

Can anyone point me in the right direction? Do I need some fancy code to get this to work?

Cheers in anticipation
NKA

View 6 Replies View Related

Using An Integer From A Subform To Filter A Report.

Aug 17, 2006

THis has to be an easy issue.

I have a subform that in the on curren event i passes the ClassId out to my main for in an unbound text box

Forms![Student]![ClassID] = Me![ClassID]

I know this part works

I then have a command button that should pass ClassID to a report so that it can be filtered. Here is the on_click code

Private Sub cmdReprintAccom_Click()
On Error GoTo Err_cmdReprintAccom_Click

Dim stDocName As String
Dim strReptCriteria As String

strReptCriteria = ClassID
stDocName = "Forms - Accomodations"
DoCmd.OpenReport stDocName, acViewPreview, , _
"[ClassID] = '" & strReptCriteria & "'"

My problem is that I keep getting a type mismatch error. I know that it is because CLassID is a number and it is getting passed as a string i just can't figure out the syntax to the highlighted code.

View 5 Replies View Related

SubForm Filter Based On A ComboBox

Aug 18, 2006

I am running into a problem with just one form in my database. I was getting the error 'Can't build a link between unbound forms'. After searching here and elsewhere the solution is/might be to type the linked fields into the child and master proprty fields. However when I do that I still can't get this form to work. Would anybody please take a look at the file attached - I trimmed it down to two tables with a few records and a form/subform.

I want to make a selection in the combo box and have the filtered results displayed on the form below - simple and I have done the same thing in the database elsewhere but I just can't see why it won't work here.

Thanks

Steve

View 3 Replies View Related

Modules & VBA :: Filter On Subform Not Turning Off

Feb 2, 2015

I'm filtering a sub form in datasheet using an option group frame, and the on click does exactly what I want it to do.However, Once I'm done filtering, I can either set the filter to all ...

Code:

Case 1
Forms!frmmain!frmtoplinelist.form.FilterOn= False
Or click a Button "Remove Filter"

Code:

Private Sub btnClear_Click()
Me.frmTopLineList.Form.FilterOn = False
End Sub

(I've tried both references to the subform too... "Me." and "forms!etc. However, the subform filter isn't switching off.

View 4 Replies View Related

Forms :: Filter Changes Subform Info

Jun 26, 2013

I have a CRM database which also handles billing for my company. I have an Order Form which displays info from the Orders table, and also various subforms from related tables (Order Details, Payments, Collection Notes). The Payments table has a One to One relationship to the Orders table and the two are linked by the Key Field Order ID.

Here is the problem, if I open the Order Form and navigate to any record the correct payment information is displayed. However if I use a Filter on the Order table the Payment information disappears and only a blank payment form displays - making it appear that a payment has not been made. If I remove the filter the payment information is still gone until I close the form and reopen it. Also, this does NOT happen to my other subforms (ie Order Details) - note that the other subforms are for tables with a One to Many relationship.I have tried basing the subform on the actual table Payments and also on a query of the payments table.

View 3 Replies View Related

General :: More Than Two Criteria To Filter A SubForm

Sep 28, 2012

I need to filter a subform based on the values on the mainform.

Criteria are Multiple. The idea is to show the user the records that are already existing in the table.

First two criteria works, stuck with the third one

I.Criteria - Creative(text type)

Private Sub Creative_AfterUpdate()
Me.frmCommercialWithDetails_subform.Form.Filter = _
"Creative ='" & Creative & "'"
Me.frmCommercialWithDetails_subform.Form.FilterOn = True
End Sub

[Code] ....

Also, how to split the code into two lines

"Creative ='" & Creative & "' And Act_ID = " & Act_ID

when broken into:

"Creative ='" & Creative & "' _
And Act_ID = " & Act_ID

is automatically saved as:

"Creative ='" & Creative & "'" _

And Act_ID = " & Act_ID " and this generates an error on execution.

View 5 Replies View Related

Forms :: Filter Data In A Subform

Jun 14, 2013

I have a subform in a form that displays all members of staffs Name and employee no. I am trying to find a way to search the subform on the main form it's on using textboxes to filter data, here is the code I have that searches the employee no.

Code:
Private Sub Command178_Click()
Dim dbs As Database
Dim qdf As QueryDef
Dim sqlstr As String
Dim sqlstrwhat As String
Set dbs = CurrentDb

[code]....

I do not get any errors and I haver used the same code structure for other subform filters but when I search for an existing employee no. the subform only displays a blank record with the employee no. 1?

View 5 Replies View Related

Forms :: Adding Filter To A Subform

Feb 25, 2015

I am trying to apply a filter to a subform.I have three tables as follows:

ITEM (primary key Item ID) (AutoNumber)
CREATOR (Primary key Creator ID) (AutoNumber)
ITEM CREATOR (junction table) (primary key Item ID and Creator ID)

ITEM has a one to many relationship with ITEM CREATOR.
CREATOR has a one to many relationship with ITEM CREATOR.

I have added a subform to the data entry form for ITEM. The fields in the subform are the fields in the ITEM CREATOR table, i.e. Item ID and Creator ID. The purpose of the subform is to link an Item to a Creator and populate the ITEM CREATOR table.These are the subform properties:

Record Source: Item Creator subform
Link Master Fields: Item ID
Link Child Fields: Item ID

The subform contains a combo box for Creator ID. These are the properties.

Control Source: Creator ID
Row Source: Item Creator Subform query
Bound Column: 1
Column Count: 9

When a user clicks on the combo box drop-down, the first 9 fields in the CREATOR table are displayed. The purpose of this is to give the user more information when linking ITEM to CREATOR, so that the correct Creator ID is chosen and the Item is linked to the correct Creator. Two of these fields are Creator Surname and Corporate Creator.

The issue is that CREATOR now contains over 2500 records. When trying to link an Item to a Creator the drop-down list that appears when the Creator ID combo box is clicked is very long and the user is potentially faced with a long time spent scrolling the list. I would like to filter the drop-down list by Creator Surname so that the user enters a surname and only the Creator IDs for the Creators that have that surname appear in the list.

View 1 Replies View Related

Forms :: Using Combobox To Filter A Subform

Jan 14, 2014

I do review SQL sometimes to check what's going on. Access has been a steep learning curve, but my understanding of queries and relationships improved a lot recently.Some of the finer points of forms are just giving me frustration. My form related knowledge probably lags behind my data/table/relationship/query related knowledge. Its probably simple, but as you know these things are not too intuitive at first.

I have a query which (built on another query and some tables in turn) delivers exactly the data I want. I want that data to come up in my form (or datasheet subform actually) BUT, I want to be able to filter for PERSON.ID. I want the user to be able to use a combo-box to do that filtering.

OK then, main form, with unbound combo-box at the top. I assume it should be unbound because I don't want any data edited based on selections which are supposed to cause temporary filtering only (correct me if I'm wrong). For the Row Source I've used a qryWholeName. This query creates a WholeName for each person, and includes their PERSON.ID as well.

[URL]....I cannot see the example DB they have attached in the thread. Finally, my database is likely to be accessed by several people at once. Different users will want to be selecting and filtering for different people simultaneously.

View 3 Replies View Related







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