1. ***** Stumped ******* Graphics for Barry
Hi Barry
Ive looked at the code. Firstly I'd strongly suggest that instead of using
a hardcoded SQLString variable to set your data control's recordsource
property to, use the following syntax:
1. Cut&Paste your recordsource String into the SQL window of a new query in
your Access database, save as "qLieuSelect", and close
2.Next...coding time.......
dim db as database
dim rs as recordset
set db = currentdb()
set rs = db.openrecordset("qLieuSelect",dbOpenDynaset)
this will pass the contents of the access querydef "qLieuSelect" to the
recordset variable "rs". Then pass the recordsource variable to your
control, Data1.
There are strong reasons for the use of a SQLString concatenation procedure
to develop a '.execute' statement. However, Access by its nature compiles
queries at 'runtime', hence building a string and then executing takes
considerably longer to compile and return vals. Given your app size it may
not be a problem, but its good to develop +ve programming habits from the
beginning.....
Investigate the contents of the Access7/8 help file on the matter of
"querydef" & "parameters" You can write a query to return the required
recordset under a given parameter ie
SELECT DISTINCT tabledef1.name,tabledef1.age,tabledef1.address WHERE
tabledef1.name LIKE [strName]
At runtime you can dim your recordset as a Querydef, and pass a runtime
variable selected by your user, to the contents of the parameter statement
thereby defining your control recordsource...
TTFN
Hope this helps or points the way..
Scott Brown
Access 2/7/8 & VB Dev'r
2. performance
3. Viewing graphics file names of inserted graphics
4. VB Learner with problems
5. Creating Graphics to load machines work (like Gantt’s graphics)
6. Help for Jdbc newbie...
7. Graphic types in Graphic Object field
8. LONG field storage details?
9. Help:Saving Graphic Image Into A BLOB Graphic Field In Paradox Table
10. Stumped...Insert Date with Stored Procedure using .CreateParameter(...)
11. Stumped on some SQL
12. Easy SQL query, but it has me stumped
13. Designer is Stumped