Parameter query for a combo box row source

A query for a combo box on a form uses a value from a text box on the same 
form. Can I refer to the text box without specifying the form name? e.g.

Currently I am using "Forms!Form1!Text1" - would like to use something like 
"Forms!(Me.Name)!Text1" 


0
JimP
4/26/2007 2:34:18 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
2173 Views

Similar Articles

[PageSpeed] 53

No. If you use the criteria in the form, it must include the form name to 
find the text box.

It might be possible to write a VBA function that returns the value of the 
active text box on the active form, and then use the function in the 
criteria of your query.

Alternatively, it might be better to avoid putting the criteria in the query 
at all. Use the Filter of the form, or the WhereCondition of OpenReport.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"JimP" <jpockmire@houston.rr.com> wrote in message
news:4630b861$0$27093$4c368faf@roadrunner.com...
>A query for a combo box on a form uses a value from a text box on the same 
>form. Can I refer to the text box without specifying the form name? e.g.
>
> Currently I am using "Forms!Form1!Text1" - would like to use something 
> like "Forms!(Me.Name)!Text1"
> 

0
Allen
4/26/2007 2:49:16 PM
Reply:

Similar Artilces:

using Query Based distribution groups between domains
I am trying to use query based DG's for passing world wide notificatons across domains. I have a global QBDG containing QBDG from our 3 child domains. When I am sendin an email to this DG the email only reach the recipients in the domain where the global dg is placed, none of the the recipients in the other child domains gets the email. When I do a preview on the global DG the child domain qbdg is visible so it looks as if it would work. Any ideas appreciated. Sounds like an issue with the expansion server. Have you considered setting the expansion server to try and work through t...

Crm 4 event log warnings. CRM Parameter Filter
Hi all, I am looking for a solution on the following issue. Any suggestions will be very welcomed! Thank you in advance. Background: We just upgraded MS Crm 3 to Crm 4 Question: Every time when a user tries to save an update of a record. A warning will be logged into Event Viewer --> Application. It happens to all entities. For example: 1. I am doing some updates on the contact form http://localhost:5555/CAMELOT-DEV/sfa/conts/edit.aspx?id={488FF696-4F8C-DE11-AC94-00505698306E}# 2. Click save 3. I will find a warning message in Event Viewer --> Application Exception information: ...

I can't query an XMLDocument with XPATH; every query returns 0 nodes
Please help! I'm using the following code to get an XML doc: string str = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=12345&city=addison"; System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(str); request.Credentials = System.Net.CredentialCache.DefaultCredentials; System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse(); System.IO.Stream inputStream = response.GetResponseStream(); System.X...

Inserting Text Box within a Text Box
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Hello, <br><br>I am doing a newsletter (my own template) and would like to &quot;pull out&quot; a quotation. How do I get this smaller text box within the larger one and formatted so that the original text wraps around that box? <br><br>Thanks so much. You can't � Text Wrap is a property which affects only how the main text of the document flows around an object. It has no effect on text within objects. You can attempt it in a Publishing Layout document but still may not get the result you'r...

Changing the font size of a drop-down box content
I create a drop-down box in an Excel cell, using a list as the drop-down box content. When I then select the drop down box, the diplayed font size is tiny. How do I increase the font size? Take a look at this link from Debra Dalgleish's site http://www.contextures.com/xlDataVal08.html#Font "Ross Macadam" wrote: > I create a drop-down box in an Excel cell, using a list as the drop-down box > content. When I then select the drop down box, the diplayed font size is > tiny. How do I increase the font size? ...

How would I "translate" source code to an executable (file)?
4:49 PM 12/28/2007 How would I "translate" source code to an executable (file)? Thank you, Barry Karas By asking a clear question regarding MS Outlook? -- John Blessing http://www.LbeHelpdesk.com - Help Desk software priced to suit all businesses http://www.room-booking-software.com - Schedule rooms & equipment bookings for your meeting/class over the web. http://www.lbetoolbox.com - Remove Duplicates from MS Outlook, find/replace, send newsletters "Barry Karas" <barrykaras1234@comcast.net> wrote in message news:F5-dnX0y-ozW7-janZ2dnUVZ_uyinZ2d@comc...

Can't select
Access 2003. I have a subform that has a record source query. The query joins two tables. DeFault View: Continuous. Allow Edits, Adds, Deletes are all Yes. Data Entry = Yes. Locked = No, Enabled = Yes. Most other form properties are default. I successfully populate the ClassTitle ComboBox's Row Source with the following statement using the OnCurrent event: Me.ClassTitle.RowSource = DLookup("text2", "tblMenusVariables", "sequence = " & iSeq & " and reference = 'DAY'"). The RowSourceType is Value List for the Class...

String Too Long in Query
I have a complicated calculated field in a query, and the builder keeps truncating my expression. Is there any way around this limitation? If necessary, I can post the calculation - but the basics are a switch by the value of class, then a switch by value of position to get the correct payout for a car race. (so each class has the switch for position) Any help would be GREATLY appreciated! Meg On Mon, 11 Feb 2008 05:17:00 -0800, Meg <Meg@discussions.microsoft.com> wrote: >I have a complicated calculated field in a query, and the builder keeps >truncating my expression. Is...

SQL insert query help needed
Hi all I am new to SQL and i would to know if anyone can help me work around this problem: i have 2 tables table1 (column1, column2, column3, column4) where column1 = integer - auto increment, clumn2 = text, column3 = text , column 4 = integer and table2 (column1 , column2) where column1 = integer - auto increment and column2 = text Now table1.column4 is related to table2.column1 thats table1.column4 = table2. column1 what i was trying is to be have an SQL statement that can insert values that are not fixed maybe different every time but i want them to be added into ...

Crosstab Query
I have some data that I need to flatten by a particular field, but it is duping up to 7 times due to one field. Unfortunately, the value of these fields is different for each unique record, so a simple crosstab will not work. Here's an example Field to Flatten Duping Field XXX ABC XXX BCA XXX CAB YYY JDK YYY KJD If there were only two dupes per "field to flatten" i could use "FIRST" and "LAST" or "MI...

Count if between date parameters
I need create a formula that show how many patients were available to be seen on each day of the month. I would like to make the cut-off for changes of dates as 3pm, meaning that one day is from 3pm - 3pm the next day. e.g. - 12/30/09 available patients would be all those there from 3:01pm on 12/29/09 to 3:00pm on 12/30/09. If they're available for the full day count them only. Using this logic with the data below on 12/30/09 only 2 patients were available to be seen. Name Request DT Res DT P1 12/27/2009 1:26 12/31/2009 16:28 P2 12/27/2009 12:00 12/30/2009 7:20 P3 ...

Query Parameter
I want to supply a parameter to a query to define the from date and to date and retrieve data falling under this from and to date. but, i do not want it to be prompted, as the same criteria is to be used in more than one table. so, i want to store the from date and o date in a temp table and related this to the date field in different tables. thanks You could create a table (tblDateRange) with 2 date fields (datStart and datEnd) and only one record. Then add tblDateRange to your query and don't join it. Set the criteria under your date field to: Between [datStart] and [datEnd] ...

Skipping rows
I'm trying to copy the contents from one sheet to another. My objective is take data that is in a row and move it into a column on another sheet. EX. move c2 in sheet a to k2 in new sheet. Repeat this but skip from c2 to c6 and place it in k3 etc. Rob, This assumes the data your copying is on sheet 1. Put the formula in k2 of another sheet and drag down =INDEX(Sheet1!C:C,(ROW(A1)-1)*4+2) Mike -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. &...

GPS Customization Query
Hi All, Is there a way to avoid/remove "Quick Links" and "Help" links from the Business Portal Site for the end users? Any help on this would be very handy. Regards, Kuldeep ...

Gridline box checked or unchecked. Gridlines do not print.
I'm new to excell and want to print gridlines. (Office 2003) With the gridline box checked or unchecked the gridlines do not print. Obviously, I must be doing something stupid. But what? Help appreciated, thanks, bobb File/Page Setup/Sheet tab, check Gridlines Bob Umlas Excel MVP "bobb" wrote: > I'm new to excell and want to print gridlines. (Office 2003) > > With the gridline box checked or unchecked the gridlines do not print. > > Obviously, I must be doing something stupid. But what? > > Help appreciated, thanks, bobb No response in...

Combine and Insert query
I have linked three csv files to MS Access Table, the table names are as follows MON.csv, Tue.csv and Wed.csv I have combined all the three tables using UnionAll function in query (qry Combine). I would like to have a query/macro funtion which can insert a column to my 'qry combine' identifing the table names example: when the 'qry combine' combines the first table Mon.csv along with the data the query must insert a new column and enter a value as "weekMon" to all the data of Monfile. In the union query you would need to add a calculated field SELECT...

combo box list shortcut
Hi I have a combo box on a VBA data entry form. One of the validated lists is approx 100 names long and is a pain scrolling through. Is it possible to maybe enter the first letter of the name and bring up only those beginning with that letter ? -- thanks Roy There's a MatchEntry property for the combobox. Try changing it to fmMatchEntryFirstLetter (either in code or via the properties window. Roy Gudgeon wrote: > > Hi > > I have a combo box on a VBA data entry form. One of the validated lists is > approx 100 names long and is a pain scroll...

How to determine the last row in a given worksheet
Hello. I have a macro that formats the worksheet from a text file to an excel file. I insert a column and create a formula on the second row of that column. How do I determine the last row in the worksheet so I will paste my formula until the last row on the new column? Thanks in advance. try lastrow=cells(rows.count,"a").end(xlup).row -- Don Guillett SalesAid Software donaldb@281.com "C C" <someone@atsbcglobal.net> wrote in message news:qUO7f.2537$Y61.591@newssvr33.news.prodigy.com... > Hello. > > I have a macro that formats the worksheet from a tex...

Problem with Microsoft Query
It doesn't return some of the data. It returns all but one actually. And I went into Microsoft Query help and followed the instructions. The file is closed, and the data is formatted the same way. Any advice on how to fix it? Jul, Your question is extremely vague. You should probably provide more explicit information about the details of your query such as The type of file are you trying to query The program you are using to perform the query Details of the query parameters Details of the information that is not being retrieved Also, make sure you change the Subject of your messag...

Enter key will no longer return to begining of next row
From one worksheet to the next, the enter key will only activate the cell directly below the current cell. What Have I done to change the direction? Have checked the direction selection in Options and as suggested by MS Help made sure the Down was selected. Doesn't change a thing. Help! Sandy look in Tools | Options | and on the Edit tab check what's in "Move selection after Enter" Regards Trevor "Sandy" <anonymous@discussions.microsoft.com> wrote in message news:212b01c3e06b$ac7afe50$a401280a@phx.gbl... > From one worksheet to the next, the ent...

optional method parameter in MFC ActiveX
How do you set a method parameter as optional in an MFC ActiveX control? Kurt "Kurt" <k_nojunk@larimore.net> wrote in message news:%23HK$bCR4DHA.2468@TK2MSFTNGP09.phx.gbl... > How do you set a method parameter as optional in an MFC ActiveX control? > > Kurt Depends, (1) do you mean when you create an activex control yourself, and you wish to make a parameter optional? Or (2) do you want to pass an optional argument to a method of the ActiveX control? Solution (1) : Make it a variant parameter. If the variant is of type VT_ERROR and the value is DISP_E_PARAMNOTFOU...

Hiding Duplicate Records in a List Box
Is there a way to hide (or not list) duplicate records that might be in a List Box? Thanks in advance for any help. Fred Yes, base your listbox on a query that excludes duplicates. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com "FredK" <fred.kelley@ci.tracy.ca.us> wrote in message news:Oil61gSsHHA.1680@TK2MSFTNGP06.phx.gbl... > Is there a way to hide (or not list) duplicate records that might be in a > List Box? > > Thanks in advance for any help. > > Fred > On Sun, 1...

HLookup and Row Index Number
Hello. I am currently using the following formula, but want to improve it: =HLOOKUP(C3,'Drivers'!$C$4:$CT$34,5) Currently it is retrieving the number in the fifth row, but I am concerned that the number will change if the reference worksheet is ever altered. Is there a way to have Excel look up a value that is in a row with a certain label (eg, "Average Size") instead of the fifth row? Thanks! You can, using the MATCH() function on the row with the labels. Look in HELP for details. But of course it would have been better if Excel could do it the way you describe, at lea...

Too few parameters?
Hello All I have SELECT statement that I have built using the SQL view of a query. The SELECT statement contains WHERE, GROUP BY, HAVING and ORDER BY parameters. All has been working fine, until today when I have needed to add an extra criteria to the HAVING part: This worked: "HAVING ((([x confirmed].name)=" & Chr(34) & [Forms]![staffs subform new]![employee] & Chr(34) & "))" but this does not: "HAVING ((([x confirmed].entered) =" & Chr(34) & [forms]![staffs subform new]![child813]![entered] & Chr(34) & ")...

Deleting specific records based on query results
Is there a way to use a select query to find and then delete specific records in a database. My database records basic applicant information in one table (tblApplicants) and any interview data in another (TblActivities). I need to do an annual purge of applicants from a previous year who were never interviewed. I have a select query that returns the name and date entered from the TblApplicants table where the requisition data in the TblActivities table is null. I know I can then go to the TblApplicants and manually delete each record, but at over 1700 records that seems a lit...