Query run from form based on text box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello. I'm trying to move a process from Excel in to Access, and while it's
been a great learning experience (I'm good in Excel, but all but a newbie in
Access) I am having an issue that I hope someone would be kind enough to lend
me a hand with. I have a form that uses a query to pull in data on 70 odd
vehicles, with numerous calculations in other boxes. This works great after
much pounding of my forehead on the keyboard. My issue is that I need to be
able to pull data from one of the other rows in one of the same tables that
the first query is in. In other words I have a vehicle that is named 300_08,
meaning a Chrysler 300, 2008 model, and I need to be able to pull a record
from vehicle 300_07, the 2007 model, into the same form. I wrote a formula in
a text box that changes the 08 to an 07 nicely for all the vehicles (also if
it's an 09 changes it to an 08). I have another query written that seems to
work by itself that pulls in only the 07 records (I can adjust for the others
when I figure this out), but I need the query to reference the aforementioned
text box.

I had thought that maybe I could just put the textbox reference in the
criteria section of the query, but that didn't work. Here's what I used =
[Forms].[Residuals]![Text497] with Residuals being the name of the form and
Text Box 497 having the adjusted vehicle name.

If someone could help I would appreciate it. My forehead is starting to hurt.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200902/1

.



Relevant Pages

  • Re: Date function voodoo in my query
    ... I have an excel sheet that is linked ... pull the data, no need for a user prompt since this is all behind the scenes ... due to the data being pulled into excel automatically from this query. ... that week you'll need to specify that too, ...
    (microsoft.public.access.queries)
  • Re: Import MS access data
    ... Have you tried creating the query in access? ... Excel record source. ... program called Actual ODBC that allows me to use Excel and Query to pull ... I can pull the data in each table into separate worksheets in Excel, ...
    (microsoft.public.mac.office.excel)
  • Re: Import from iSeries400
    ... You could import it to a temporary table as text, then translate from the ... text date to a real date in a query. ... This is presently in an Excel ... > with no problem but need to pull the text file directly into Access. ...
    (microsoft.public.access.externaldata)
  • Excel Get Data - Unique Records only
    ... One thing you could try is to open your query in MS Query, ... When the SQL preview window opens ... the data to Excel. ... I'm pulling this into Excel but only want to pull the ...
    (microsoft.public.excel.misc)
  • Re: Access 97 - Multiple Table Query Question
    ... but the most logical approach to me would be a simple query ... > applications table is the next place I'm stumped. ... > What would be the best way to pull that information? ... one Vehicle could appear many times? ...
    (microsoft.public.access.queries)