Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Project Help!!!!

Status
Not open for further replies.

randusoleis

IS-IT--Management
May 11, 2001
43
US
I am having trouble with a "view".
I have an access database that uses a query and report to print the current displayed record using [FORMS]![MainForm]![FormField] as criteria for the query.
After upsizing the database to SQL7.0 and creating a new Access Project the darn thing will not accept the same criteria. Something about unable to change vchar to int. What's up with this and how can I make it work. Randusoleis.....
 
Is the value of the control in your query supposed to be numeric? It sounds as though SQL Server is either trying to convert a varchar into an int that contains no numeric data or it is trying to interpret the control itself as an object. To eliminate the latter, put .value at the end of your criteria expression. If the former you need to check your data. If neither please give as much info as you can about the query and the error. JHall
 
j,
I realized that one of the fields in the view was an AUTONUMBER. I have removed that field as it was not necessary.
I am still having the problem. I enter the criteria as =FAMID.value and the view will save properly but upon opening it shows no data. If I place an actual value there (one that equals true data) I will get the info I want. Is there a way to prompt the user to give this value? Randusoleis.....
 
Your form value is being interpreted as a varchar by SQL Server. Try:
=INT(VAL([FORMS]![MainForm]![YourField].Value))

You can prompt the user for the parameter value by surrounding it in brackets like =[FAMID]

JHall
 
Also =[FAMID] will not give the user an option. Randusoleis.....
 
I'm sorry you have to put something other than the column name in there. Like:
[Please enter the Family Id Number] JHall
 
Tahnks for all your help guys. I found the solution.

I created a stored procedure that contained a perameter(variable). Set the SP as control source for my report then set Input Parameters like this FORMS!HEAD!FamilyID.
Bada Bing!!! Randusoleis.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top