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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any reference to be included to use Data Control

Status
Not open for further replies.

jamesleong

Programmer
Jan 29, 2003
22
0
0
MU
Hi,
can anyone help on this. Am actually using a data control on my form. I set the different properties for the data control. I am getting two errors:

1st error: Could not find file 'stockdata.mdb'

and when i click ok.

2nd error: run-time error 91, object variable or with block variable not set.

Am lost with this, thanks for help.

Thanks to Azrobert for valuable help so far.

James.
 
please post your code, as you do not give enough detail in your last post.

BB
 
Hi,
Actually there is no code. Am using the 'data' component from toolbox to access a table from a Microsft database. For the connect property, set it to Access 2000, for the DatabaseName set it to "c:\project\stockdata.mdb", for the recordsetType set it to 0-Table and for the Recordsource set it to customer which is the table i want to access.

I installed service pack 5 with the help of Azrobert. It eliminates errors at design time. But now am getting errors at run-time. First error is 'could not find file 'stockdata.mdb' and second error is 'runtime error 91, object variable or with block variable not set'.

Can you help me. Thanks in advance.

James
 
Is the datafile in the right place? Is it's name spelt correctly?

The second error probably comes from the first.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Hi,
The datafile is in the correct place and it's name is correctly spelt. I just checked the DatabaseName property and Recordsource property for the 'Data' compoment.

Thanks.

James.
 
Hi,
Thanks. When i set the databasename and recordsource properties for the 'data' component, it does not work! I set them in the form load event and it works. A special thank to Azrobert.

James.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top