473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

passing data to a query from an inputbox

The SQL below worked in Access 95 (V 7) is not working in the current
version (V 2003).

What is supposed to happen:

1) From my form I hit a button that calls an input box.
2) Underlying this form is a query, and the data entered into the input
box is passed to the corresponding field in the query.

When I set up the query, I used "Design View". Here is the SQL that
that was created:

SELECT Properties.OwnerID, Properties.TST, Properties.TSTNUMB,
Owners.COMP, Properties.MLSDIST, Owners.F, Owners.L
FROM Properties INNER JOIN Owners ON Properties.OwnerID =
Owners.OwnerID
WHERE (((Properties.MLSDIST)=InputBox$("«MLS Dist.??»")))
ORDER BY Owners.COMP, Owners.L;

When I run this query in my current version of Access I get this error
message:

"Function is not available in expressions"

With respect to "expressions", in the query grid there is a row
labeled "Totals". In that row, "expressions" self-populates in every
column .

Stan

Mar 15 '06 #1
1 2460
Instead of what you did try this

SELECT Properties.OwnerID AS Expr1, Properties.TST AS Expr2,
Properties.TSTNUMB AS Expr3, Owners.COMP AS Expr4, Properties.MLSDIST
AS Expr5, Owners.F AS Expr6, Owners.L AS Expr7
FROM Properties, Owners
WHERE ((([Properties].[MLSDIST])=[MLS Dist.??]))
ORDER BY Owners.COMP, Owners.L;

Mar 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stuart E. Wugalter | last post by:
Hello All! I have a button on a form that is tied to the following query: UPDATE tblSEQTAQ AS A SET A.taqcall = WHERE (((A.taqcall)="Allele 1")); The user looks at the form and decides to...
2
by: Roberta | last post by:
Hello, When I use the following code to print a report for a certain client, it works fine: DoCmd.OpenReport "rpt_MNMTSingleCover_Summary_Recommendations", acPreview, "", "!=" But I want...
5
by: rettigcd | last post by:
Hello, I need to create a custome form that operates similar to the MsgBox() and InputBox() functions. I can't figure out how to pass data to a MODAL dialog box (form). I've tried 3...
5
by: Dakrat | last post by:
Allow me to preface this post by saying that this is my first database project, and while I have learned a lot, any concepts I have learned are hit and miss as I have found new requirements and...
3
by: Bruce Lawrence | last post by:
I've got a form that when it opens it prompts the user for 2 peices of information. The Asset and the Date. getasset = InputBox("Enter the Asset Number") If getasset = "" Then Exit Sub Else...
2
by: beepstreet | last post by:
I have a question of calculating the total cost of breakfast, dinner and lunch and also displaying the total amount sold in a week. The cost for... breakfast is 2.45 lunch is 3.75 dinner is 3.95...
3
by: alexmason86 | last post by:
getting a bit stuck here got some code that allows a user to input numbers to a 3x3 array. but next on the tutorial sheet i have to then ask the user for a number to search for and then search the...
0
Dököll
by: Dököll | last post by:
Continued from: http://www.thescripts.com/forum/thread762010.html -VB 6.0 Professional -Microsoft DAO 3.6 Reference Search Database table... An attempt to fetch data housed in Access:
4
by: RachH | last post by:
Is there a way to pass a value to a report via VBA so the value can then be displayed in the report as a concantenation with a string? I have a report that displays all pricings that have occured...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.