Select subform's query criteria from form's unbound cbo

I want users to be able to select a name from a form's unbound combo box and 
that selection to automatically become the criteria for the subform's 
underlying query, without the parameter box for the query popping up.  How do 
I do this?  I'm new to VBA and not an Access 2003 whiz either.

TIA for your help!
0
Utf
5/22/2007 6:21:01 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1471 Views

Similar Articles

[PageSpeed] 56

WorkerBee wrote:
> I want users to be able to select a name from a form's unbound combo
> box and that selection to automatically become the criteria for the
> subform's underlying query, without the parameter box for the query
> popping up.  How do I do this?  I'm new to VBA and not an Access 2003
> whiz either.
>
> TIA for your help!

You should be able to include that in the MasterLink and ChildLink 
properties of the subform control and it would all be handled automatically.

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com 


0
Rick
5/22/2007 6:27:36 PM
How do I include this in the MasterLink and ChildLink properties of the 
subfom control?  Currently the properties are set to Scientist ID which is 
the primary key for the table used in the form, and the secondary key for the 
table I'm using in the subform.  In the MasterLink property I tried to 
reference the unbound cbo on the form and identify the column where the 
Scientist ID is stored [cboAuthorName].Column(2), but no luck.

Is there something I'm missing

WB

Please point me in the right direction to 
"Rick Brandt" wrote:

> WorkerBee wrote:
> > I want users to be able to select a name from a form's unbound combo
> > box and that selection to automatically become the criteria for the
> > subform's underlying query, without the parameter box for the query
> > popping up.  How do I do this?  I'm new to VBA and not an Access 2003
> > whiz either.
> >
> > TIA for your help!
> 
> You should be able to include that in the MasterLink and ChildLink 
> properties of the subform control and it would all be handled automatically.
> 
> -- 
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com 
> 
> 
> 
0
Utf
5/23/2007 4:14:00 PM
Reply:

Similar Artilces:

Listing in previous records in Form by vertical scrolling
Please help, I would like to set up a form the way that if I enter the record I would like to see that record and access should open a new line where I can add a new record. I would like to scroll vertically in the old record to edit them eventually. I know that there can be a Record selection but I don't want that. Thank you for help. I cannot find it myself. On Wed, 28 Nov 2007 07:40:01 -0800, Jan <Jan@discussions.microsoft.com> wrote: >Please help, > >I would like to set up a form the way that if I enter the record I would >like to see that record and access s...

Scroll bar not showing in a text box on a continuous form
Hi I'm using Access XP and have a continuos form (which is a subfrom) which contains three text boxes. Each text box has its scroll bars property set to vertical yet they don't show. I tried using the on enter event to programatically set them using something like "myControl.scrollbars=2" but still they don't show and the code doesn't generate any error. This is a pain as the user doesn't know if there's more text than what's displayed. I'd like to avoid setting the height of the text box to show an extra half line so it's obvious as this...

how do i count text cells in excel based on variable criteria?
I need a formula that will recalculate when the variables are changed. For example, I will input the variables for date "1/26/2010" and BU "09" and I want a count of how many assets that meet those criterion. For Acctg Date: 1/26/2010 BU: 09 Asset Count:_____ BU Acctg Date 08 1/25/2010 06 1/26/2010 06 1/25/2010 09 1/25/2010 09 1/26/2010 09 1/26/2010 Assuming in your example the date is in B1, the BU is in B2 and your data is in A5 to B10, enter this formula =SUMPRODUCT((A5:A10=B2)*(B5:B10=B1)) "anmaka57" wrote: > I need a for...

Set a form as a subform without the Wizard?
Hello, Using Access97, can I somehow set a form I have as a subform in another existing form when I have the typical install and no install media? When I try to follow the Help system procedure it errors saying the necessary Wizard is not installed. Is it possible to do it by other means? Regards, ern. On Fri, 17 Aug 2007 00:26:16 +0100, "ernie" <ernie@unspam.co.uk> wrote: >Hello, > Using Access97, can I somehow set a form I have as a subform in another >existing form when I have the typical install and no install media? When I >try to follow the Help system pr...

NEWBIE question. Fields with calculations correct on form not showing up on report?
I have basic fields that are on a data entry form so when the clerk types in quantity and unit price the TOTALS field calculates this. When I look at or pull in the TOTALS field on my report it just shows $0's. How do I get the report to show what's on my form? On Thu, 24 Jan 2008 10:00:37 -0800 (PST), p-rat <osupratt@yahoo.com> wrote: >I have basic fields that are on a data entry form so when the clerk >types in quantity and unit price the TOTALS field calculates this. > >When I look at or pull in the TOTALS field on my report it just shows >$0's. How do I ...

Need Help Filtering a Form with VBA
I have a form whose underlying data comes primarily from "Table1" (for this example). On the form is a drop-down box that displays a field named "Primary OBS" for each record. "Primary OBS" is stored in "Table1". It is an index into another table "Table2" which contains a field named "Team Code". "Team Code" can look like "JD130000" or "JG320000", etc. What I need to do is to filter the records in the form by the first two letters of the "Team Code". In other words, the user ca...

Query Timeout error
Hi There, I sometimes get the following error when I execute a SQL 2005 stored procedure using ADO VBA in Access 2003. -2147217871 MS ODBC SQL Server Driver Timeout Expired The ODBC Query Timeout Reg key is set to 0 and the SQL Server remote query timeout options are configured as in this article: http://support.microsoft.com/kb/314530/en-us I never get this when I execute the stored procedure in SSMS Express. Another oddity is that the query usually succeeds even when I get the error. Are there any other settings to try? TIA, Josh ...

POP Blank PO Form #2
Is there a way to limit the number of lines that are printed on a page? Want to limit 10 and then go to new page. -- Christopher Sorel ...

Text On Forms Becomes Blurry/Bold
Hi everyone, I have an interesting problem that I can't find a solution to. Once a form has focus for a few seconds, some of the text becomes blurry and slightly bold. There is no code on the form that would cause this to happen. I was wondering if anyone has seen a bug like this before. This only happens on some computers that use the database. I am using Office 2003. See these images: http://www.kslab.com/normal.jpg http://www.kslab.com/blurry.jpg Thanks in advance, Joshua Joshua Did you check at the Search sites? I've never heard of this happening before. Well, actua...

Help With Score Card / Questionnaire Type Form
This is part of a longer post I tried to send earlier. I am building an Access application that resembles a questionnaire or score card. This is occurring to capture data in a database instead using individual Excel spreadsheets as is the practice now. I need help with getting the form to look like the spreadsheet with multiple questions displayed on the screen at the same time. I have created a table, DM Checklist, that contains the fields store number, date, DM category, pt value and question, and score. I have other tables – DM Category Table, DM Category Comments Table, Sales ...

Web query time out problem
Hi, I have a workbook with around 350 sheets each with a web query in. If try to update all, about a half of the sheets will successfully updat before the message 'www..... The access to this internet site ha exceeded the allotted time'. Can anyone suggest a workaround? For example would it be possible t update the web queries in batches of 100? Thanks, Berti -- claytor ----------------------------------------------------------------------- claytorm's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1161 View this thread: http://www.excelforum.com/show...

synchronizing forms on a tab control
I have placed a customer listbox on page one of a tab control. On page two I have a form bound to a customer table. When I select a customer in the listbox and click on the tab for page two I would like the form to show info for that customer. how can I synchronize the two? Steve, I would assume that your customer table has a key field like CustID. Use the combo (ex. cboCustID) to select a legitimate CustID. Make cboCustID the Parent, and CustID in the subform the Child. Use the AfterUpdate event of cboCustID to Requery the subform, whenever the value of cboCustID changes. -- ...

Montly Query
Hi everyone, I need your help in constructing a query that reads the data field in the table, so it only returns the dates asked. What i need now (and i hope to start gainning enough knowhow to do it miself) it to bild a query (12 of them) for 1 month. January of instance, displaying all the entries betwen 01-01-2007 and 31-01- 2007. This should be simple, but iam still learning, so sorry for being a noob ;D TY -- Message posted via http://www.accessmonster.com How about one query where you specify the date range? In the criteria "cell" under your Date fields enter the foll...

Subform's Query
I have created a form and a sub form in it. I have radio buttons, now what I want is that if first radio button is select Form-A opens in subform and when I select second radio button, Form-B opens in subform. I have created a Event_Procedure for After_Update radio buttons like this: -------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------- Private Sub Radio_A...

Conditional Query Data in a Report
Is there a way to include the search criteria from a query in a report? More specifically, I use a date condition in a query to produce a report, and I'd like to add the date entered in the message box to the report. Is there a way to do that? If you are trying to do this using only a query and a report, I'm not familiar with a way. If you want to do this, the one way I know of is to use a form to "collect" the criteria that your query uses, then refer to the value entered in the form from within the report. Regards Jeff Boyce Microsoft Office/Access MVP "sil...

Exporting all forms record either in a table or Excel 2007.( Any m
Dear All, i have a form that contains 347 records.I want a macro that copy all the field from each record and generate a table in access and save all the fields in a row. i.e Record 1 all fields should be saved in Table first row then record 2 in second row an so on till All records saved. Moreover Is there any alternative option that either all records fields exported to excel file. Please help Rgds, Aligahk06 aligahk06 wrote: >Dear All, >i have a form that contains 347 records.I want a macro that copy all the >field from each record and generate a table...

How to summarize Access query data?
I have a table and a resulting query with 1,400 records. I would like a summary page for a given category. For example, there are 20 people and each has a number of work orders they are responsible for. Each work orders has a discrete identification number. I want two numbers per person: (1) the number of orders they have (a count) and (2) the sum of all the "Remaining Hours" each person has associated with their associated orders. (The existing query takes the estimated hours and subtracts the actual hours with the result being the "Remaining Hours.") This is...

Open Same Form 2 Different Ways
I am coding with C# in Visual Studio 2005 for a database application residing on remote MS SQL Server 2005. What I want to do is open the same form but from 2 different places and only one instance. I currently have the form where it will open from a double click on datagridview from another form to the proper record and only one instance. However, doing this bypassed by databinding source for opening the form to all records. I still want to be able to open the form to all records again only one instance. I think I need to set up custom load methods and run a form load check with if/else ...

Form display shutting down
Hello. I want do do the following: when I display in a form a record one after another, when I reach the last one, the displays automatically ends or go to a end form to tell the user that the presentation ended. What is happening right now, is that when I reach the last record and I enter TAB, appears a new empty record. Note that this is not a only presentation session, I mean, I need to enter some information in the records while displaying. Thanks in advance. Best regards. On the Data tab of the properties sheet for the form, set "Allow Additions" to NO. acores wrote: >H...

Forms, Fields, and Restricted Editing
[This post applies, at least, to Wd2007 and Wd2010.] If I use the content controls under the developer toolbar, I can restrict editing (also under the developer toolbar) so the user can just tab through the places he/she needs to enter information. On a different model, I can insert ASK fields and REF fields so that the user enters information in response to prompts, and the info becomes replicated at various places throughout the document. But it does not appear that I can restrict editing *and* use ASK and REF fields in an online form. So here's my problem: is it possible--...

What happens with forms after windows is unlocked
I have several subforms set to function for data entry only (edits, deletes, navigation disabled; additions, data entry enabled). Everything works fine until I lock and unlock my computer. Several seconds after the computer is unlocked both subforms select and display an existing record. In one case it's the first record in the table, in the other a record in the middle and I can't figure out what's special about it. I've tried sticking event handlers on what I though were the most like events to blame but all I've managed to figure out is that whatever is going on is oc...

Form print problem
Hi I'm not if this is the right place to post this issue, but here we go: I have a database application, which when prompted prints out a detail section of a form. This has been working nicely in access 2000, in which the application has been developed. Now I have installed access 2003, and suddenly an empty blank page is printed before the actual page. In the design view under page setup I can see that the paper size is "Letter" - In access 2000, however, the paper size was set to "A4". I can't change the setting - it always reverts to "Letter". I ...

Excel2000: Is there a way to use name as parameter for ODBC query from Excel table
Hi I have an Excel workbook where dates, started from 01.01.2003 and up to some year in future (2011 at moment), along with some other information (i.e. workday/weekend/holiday, working hours etc.), are listed. This table is read into another workbook, using ODBC query. But the problem is, that I don't need all those future dates. I can't use any functions exept MIN, MAX, SUM and COUNT in query from Excel files, but is there a way to pass a name as parameter. P.e. I define a name: CurrDat=TODAY() and use it in query's WHERE condition, like .... WHERE MyTable.Datefield Is Not Null...

Form with two nested subforms.
I am setting up a database with three main forms. The parent form is called [Orders]. The first subform is called [People]. the Second subform is called [records]. Each order can have multiple people in it. Each person can have multiple records. To keep all of the data on one page, I nested two different subforms. The problem is that I am having problems running simple functions on my second subform [records]. The first problem is using the findrecord operation to find a value (MaxID) in the ID field. Here is what I have: Forms![Orders]![People].Form![Records].SetFocus Forms![Or...

Macro
Hi, i need an macro to select all filled cells in range C10:K90. Can this be done? Thanks!!! Range("C10:K90").SpecialCells(xlCellTypeConstants, _ xlNumbers + xlTextValues).Select If you want to select xlErrors and xlLogical add those to xlNumbers + xlTextValues -- Jacob (MVP - Excel) "puiuluipui" wrote: > Hi, i need an macro to select all filled cells in range C10:K90. > Can this be done? > Thanks!!! It's perfect! Thanks! "Jacob Skaria" a scris: > Range("C10:K90").SpecialCells(xlCellTypeConstants, _ >...