Lookup query value from Form

Hello.

I have a form that I would like to lookup values in several taxt
boxes.  The values I want displayed are from several different Sum
Queries.

Example: I want to pull Total Working Blance from a query and monthly
rent revenue from another query.  The values all come from different
tables.

Is this possible?

Thanks for the help.

0
Wes
10/31/2007 2:25:26 AM
access.formscoding 7493 articles. 0 followers. Follow

5 Replies
325 Views

Similar Articles

[PageSpeed] 59

you can use a DLookup() function to retrieve the queries' values. read up on
the function in Access Help, so you'll understand how it works. then add an
expression to each textbox control's ControlSource property, as

=DLookup("MyField", "MyQuery", "MyCriteria = 'if the query returns more than
one record')

hth


"Wes" <wesley.allen@gmail.com> wrote in message
news:1193797526.359274.225310@o38g2000hse.googlegroups.com...
> Hello.
>
> I have a form that I would like to lookup values in several taxt
> boxes.  The values I want displayed are from several different Sum
> Queries.
>
> Example: I want to pull Total Working Blance from a query and monthly
> rent revenue from another query.  The values all come from different
> tables.
>
> Is this possible?
>
> Thanks for the help.
>


0
tina
10/31/2007 3:00:36 AM
Wes wrote:
>I have a form that I would like to lookup values in several taxt
>boxes.  The values I want displayed are from several different Sum
>Queries.
>
>Example: I want to pull Total Working Blance from a query and monthly
>rent revenue from another query.  The values all come from different
>tables.
>
>Is this possible?

Probably possible.

If the queries only result in one record, then you can use
the DLookup function the get the value of one field:

=DLookup("[some field]", "name of query")

If it's more complicated than that, please explain what you
want from the query and how you identify which record should
be used.

-- 
Marsh
MVP [MS Access]
0
Marshall
10/31/2007 3:05:55 AM
On Oct 30, 10:25 pm, Wes <wesley.al...@gmail.com> wrote:
> Hello.
>
> I have a form that I would like to lookup values in several taxt
> boxes.  The values I want displayed are from several different Sum
> Queries.
>
> Example: I want to pull Total Working Blance from a query and monthly
> rent revenue from another query.  The values all come from different
> tables.
>
> Is this possible?
>
> Thanks for the help.

Thank you.  I tried this and get error "#Name?".  Any ideas?

0
Wes
10/31/2007 1:35:08 PM
Wes wrote:

>On Oct 30, 10:25 pm, Wes <wesley.al...@gmail.com> wrote:
>> I have a form that I would like to lookup values in several taxt
>> boxes.  The values I want displayed are from several different Sum
>> Queries.
>>
>> Example: I want to pull Total Working Blance from a query and monthly
>> rent revenue from another query.  The values all come from different
>> tables.
>
>Thank you.  I tried this and get error "#Name?".  Any ideas?


Since you did not post your follow up question to a specific
reply, we don't know what "this" you tried.  It would be a
big help if you would post a Copy/Paste of the expression
that you used.

As it is, I'll take a guess that you forgot to use an = sign
or have incorrect quotes.

-- 
Marsh
MVP [MS Access]
0
Marshall
10/31/2007 5:41:58 PM
On Oct 31, 1:41 pm, Marshall Barton <marshbar...@wowway.com> wrote:
> Wes wrote:
> >On Oct 30, 10:25 pm, Wes <wesley.al...@gmail.com> wrote:
> >> I have a form that I would like to lookup values in several taxt
> >> boxes.  The values I want displayed are from several different Sum
> >> Queries.
>
> >> Example: I want to pull Total Working Blance from a query and monthly
> >> rent revenue from another query.  The values all come from different
> >> tables.
>
> >Thank you.  I tried this and get error "#Name?".  Any ideas?
>
> Since you did not post your follow up question to a specific
> reply, we don't know what "this" you tried.  It would be a
> big help if you would post a Copy/Paste of the expression
> that you used.
>
> As it is, I'll take a guess that you forgot to use an = sign
> or have incorrect quotes.
>
> --
> Marsh
> MVP [MS Access]

I had an incorrect quote.  My apologies.  Thanks for the help.

0
Wes
10/31/2007 6:42:12 PM
Reply:

Similar Artilces:

Merging List w/ a Form
Can anyone assist me with merging a form created in Excel with a database (or list) also created in Excel? I know how to merge an Excel worksheet to be used as a database for Word in the Mail Merge command, but my FORM, with which I am trying to merge my database, was created in Excel and needs to remain under its format (not be converted to Word). I am filtering the information I need from the database to be imported to the Excel Form. Any help would be appreciated. Thank-you. If you're trying to display information from one record in the database, there are sample files here...

Counting cells with a value in them
We are running an "If" equation on a column to determine if an event i taking too long to do. The resulting equation will yield an "X" if i is taking to long and a " " if not. I would like to have an equatio calculate the number of "X" in the column. Any ideas? Chris Nelso -- chris ----------------------------------------------------------------------- chrisn's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=650 View this thread: http://www.excelforum.com/showthread.php?threadid=31880 We had a brain cramp and one of th...

Dlookup minimum value
Hello. I'm trying to use Dlookup to get the minimum date from a table. I was trying to do the following command: mDate=Dlookup(min("dateField"),"tblName") Somehow the code points an error on"Min", saying that "Sub or Function not defined". Is it possible what i'm doing? Is there any other way instead of looping through all the records? Thanks. Luis Try DMin() instead of DLookup() -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rat...

Comparing Values In 2 Columns
Hi, i have 2 list of students names both of which are not up to date with each other and because of this one list has more students than the other. I want to search for students names and see if there is a match, if a match is found i need to copy the email address and paste it into the cell by the other name in the other list. See Below My spreadsheet has columns titled, (A)Display Name, (B)Display Email, (C)Sims Name and (D)Sims Email. I basically want to write a script that takes each individual display name in column A and searches in column C for an identical match, if a match is found i...

Does Multi-Field Index Work For Date/Time Values Only
I created a MS-Access DB table with the following 3 columns: ColID - PRIMARY KEY Col1 - Number Col2 - Date/Time Next I created a multi-field index using Col1 & Col2. I entered the following row in the 1st row: 1 5/10/2007 Next when I tried to add the above row again, as expected, I wasn't allowed to enter the same row. Next I entered the following 2 rows: 1 5/11/2007 2 5/10/2007 Both the rows were accepted. After this I deleted the 3 records, went back to the design view & changed the data type of Col2 from Date/Time to Number keeping the multi-field index...

Calling VBA subroutine from a query?
Can I call a VBA subroutine from within an Access query? I wrote some English to Metric conversion routines in the Access VBA code and would like to run a query on the data that will return coverted values. I need to be able to execute this from outside the database (run the query from another program). Yes. The function must be a Public Function in a standard module. You use a calculated control to return the results of the query. ConvertedValue: MyFunction([SomeField]) -- Dave Hargis, Microsoft Access MVP "DavidY" wrote: > Can I call a VBA subroutine from within an ...

value of value of a variable.
I tried searching, but no use! I have a Const NameA = "BLA BLA" I have a variable NameB Value of NameB is NameA. How do i get the text "BLA BLA" from NameB variable Is there anyway to do that? something like,, VALUE(NameB) Thanks & Regards Joe Hi Dim NameB as String NameB =3D NameA in a cell you could have range("A1").Value =3D NameB would now have content "BLA BLA" regards Paul On May 21, 12:35=A0pm, Joe <joe.varghese.j...@gmail.com> wrote: > I tried searching, but no use! > > I have a Const Name...

Filter Report by Form
I'm using the following code from the wonderful Allen Browne which works perfectly in an either or scenario (either by Start/End Date(s) OR filtering by client name; but I don't know what syntax to use to filter by Start/End date(s) AND anything typed in the client name field. I'm sure it's easy but I can't get my head around it. I appreciate any and all assistance!! Private Sub cmdPreview_Click() 'On Error GoTo Err_Handler 'Remove the single quote from start of this line once you have it working. 'Purpose: Filter a report to a date r...

LOOKUP Function #6
I discovered LOOKUP today and it worked fine until I made changes to the table of data. Now it's returning incorrect figures. Any suggestions? AC Sales wrote: > I discovered LOOKUP today and it worked fine until I made changes to the > table of data. Now it's returning incorrect figures. Any suggestions? --------- For LOOKUP() to work properly the data all has to be sorted into order first. Did you perhaps put an out of sequence value into the table? Bill ...

Button on Form to Run Report based on Query with Parameters
Hi Guys. I am busy working on a stock control database (and job control). When I have a Form Open, it shows several fields, including JobID (Which is the PK for that job) (frm_Invoicing) I also have a Query that when Run, it prompts for the JobIDNo. (qry_CustJobsInvStock) I have a report based on that query. (rpt_CustJobsInvStock) I have added a button onto the form (onclick -> DoCmd.OpenReport) to open and automatically print the report, But I just cannot figure out how to get it to get my JobID from the form, and to Automatically add it as a Parameter for the que...

lookup row number
Hi, can you tell me how to lookup the row number of a name in a list. EG say I have a list of names as below: Andrew Mike Steve Ian Paul I would normally just add a column with the row numbers and then lookup the row number in the second column but is it possible to do without adding the extra column by using the row formula someohow? Thanks Hi Michael Try the below.. =MATCH("Mike",A:A,0) -- Jacob (MVP - Excel) "Michael" wrote: > Hi, > can you tell me how to lookup the row number of a name in a list. > > EG say I hav...

Center Access2007 Form in the middle of access Main Window
Thank You Is there any easy way to center access 2007 forms in the middle of the screen (Monitor) or access main window. and give me good result Hello, I think there is no built in feature to achieve this goal. You may need to create a new form and configure it as the main window. You could enumerate forms and create buttons etc to open forms from this main form. For example, you could use hte following code enumerate forms in your database: Dim db As Database Set db = CurrentDb Set cntContainer = db.Containers("Forms") For Each doc In cntContainer.Documents Str...

how can I show repeating values in a chart?
I would like to show modes in the form of a pie chart but am not sure how. For example the number 73 comes up 3 times in a column on my spreadsheet, how can I show that compared to the number 50 which come up 2 times in the sheet? Thanks for the help Hi, You will need to compute those values using formula or a pivot table and then chart the results. Cheers Andy Cindy wrote: > I would like to show modes in the form of a pie chart but am not sure how. > For example the number 73 comes up 3 times in a column on my spreadsheet, how > can I show that compared to the number 50 whi...

Table-like Outline and Collumm that sums prevous values up
Hello The report I would like to have should be in a tabular form just like the doc document I have attached. However, until now I have not found out how to set the report into a tabular outline. It is quite uncomfortable and time intensive to set up this report by using lines and the different text fields. In addition, it will not look any good at the end.. Also, I would need a columm that is able to sum up the values before. Just like the "total" under each semester. Are the issues solvable? Greets, Hubertholz attached: http://rapidshare.com/files/35708241...

Automatically update Value for data label
Hello I am using Excel 2003 SP2, and have some graphs which have the value (data label) for the last month. Each month new data is entered and the data label has to be deleted for the previous month and the data label for the most recent month added (it still uses the same old data - new data is only entered for the most recent month). Is there any way where the data label can automatically update with the most recent months value (as the chart updates itself automatically currently). Any ideas appreciated. Thank you in advance. Regards, Nav ...

Printout Method
In building a form to allow users to print a "blank form" I've constructed as an Access Report, I'd like the user to be able to select the number of copies to print. It looks like the PrintOut Method would be a good choice for this, but I'm not smart enough to know quite how to get the "Copies" argument to get its input from the textbox on my form, where the user will enter the number of copies they'd like to print. Suggestions? -- Thanks, Croy Does the report have a record source? -- Duane Hookom Microsoft Access MVP If I have helped you, please help...

Table-lookup transformations
Hi, we are doing some table-lookup transformations based on LEFT and INNER joins. Probably around 100 - 50K rows/second or something like that. I have noticed that the lookups are getting slower and slower due to a growing database. The server itself is heavily loaded, CPU and IO-subsystem - which I know is not a good combination with SQL server :| I am looking for a way to increase the table-lookup transformation speed without mixing up things with SSIS.. Are there any good ways of doing table-lookup transformations within SQL server? Would it be a good idea to write s...

email form script to show email adresses of all recipients
I see there is a field in the attributes called torecipients but I cannot add it to the email form. Is there a way I can script this into the email form to show the email addresses of all of the recipients. My idea involved creting a new attribute called all_recipients and adding it to the form then doing a onchange for each of the to, cc, and bcc fields to update all_recipients. SO far it doesnt work. All the field returns is "undefined". Any help is greatly appreciated!!! ...

Access 2007-Table not displaying the values from a combo box
I have built a database to schedule senior/disabled transportation appointments. I have created two tables and associated forms for data entry. I placed a combo box in the Schedule form so end users choose a client and fields complete on the form with client name, address, city, and home phone number. I did instruct Access to store the data in the SeniorIntakeID field in the Schedule table. I wrote a report that staff execute to see what is scheduled for a given date, for each driver. On the report I want to see the actual client's name, address, city, and home phone n...

Fill Form And Get $5000 To Your Home.
Fill Form And Get $5000 To Your Home At http://ukcitygirls.co.cc Due to high security risks,i have hidden the cheque link in an image. in that website on left side below search box, click on image and enter your name and address where you want to receive your cheque. please don't tell to anyone. ...

Matching Zip coded in a Query
I have query that joins two tables using the Zip Codes (only show the records where the Zip codes match). The problem is that in one table, the listing of zip codes, it is 5 digit zip codes. In the main table some of the zip codes are 5+4 zip codes. My current query leave out the 5+4 Zip codes. I want all the records as long as the 5 digit zip codes matches. I quess I could delete the - and the last 4 digits on the main table, but it would be nice to retain the whole zip codes. Is there a way to do this? Thanks!!!!! Use Left(MainTableZipCodeField,5) to compare to the original ...

Updated records in forms
Each record in a form is a work order. School, contractor, days of work, etc. I have a pop up calendar to select a week ending date for each record. Record 1's week ending date is Nov 13, 2009. Record 2's week ending date is Nov 20, 2009. When I change the date in record 2, it's changing the date in record 1. Each record's week ending date become all records' week ending date? Can I use a pop up calendar in a record and be able to retain the correct week ending date for each record. If so, how would I be able to accomplish this? Thanks for your inp...

requery subform from sub form
Thank you how can i requery subform from subform ? "a" <youb@hotmail.com> wrote in message news:%23R9c$8tSIHA.2000@TK2MSFTNGP05.phx.gbl... > Thank you > how can i requery subform from subform ? Me.Parent!Subform2ControlName.Form.ReQuery thank you the work correctly "Stuart McCall" <smccall@myunrealbox.com> wrote in message news:fl83eg$3o6$1$8300dec7@news.demon.co.uk... > "a" <youb@hotmail.com> wrote in message > news:%23R9c$8tSIHA.2000@TK2MSFTNGP05.phx.gbl... >> Thank you >> how can i requery subform from subfo...

how to read textbox value from vb.net
i have added a textbox from developer>control tab>activeXcontrol>textbox in word document 2007. the content of the textbox includes "my name is supriya upadhyay". now i want to open this word file from vb.net and wanna read the content of the textbox. plzzzzzzzzzzzzzz help me out ...

How to find value that is bigger or smaller than 2SD?
I am new to excel, my question may be silly for you. But I really don't know how to do it and hope to get your help. I need to do statistic analysis of my data table which has lots of columns. First of all, in each column, I want to find and highlight the value that is bigger than mean+two times standard derivation, or smaller than mean-2* standard derivation. Do you have any suggestions about how to do it? Thanks alot, ming Hello, Maybe something like this ... Sub HighlightForMePlease() Dim rngLook As Range, c As Range, firstAddy As String Dim lngSTDEV1 As Double, lngSTD...