Discussion Locked

Application in VB6

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We generally open the Specific Database from the Application, VB project. But I want to create that application which can open any Access Database file at any location in the run time.

I have got the solution of this problem up to open the Database, Save/delete the records. But I have a problem in the properties / validation for the field.

How can I get the properties [like Data Type (Text, integer, etc.), Field Size, Caption, Format, Validation, Description etc.] of any field of that table in run time of the application?

how can I validate the field?

Can anyone know the solution of this problem?

5 replies

by john_wills

"that table"? In VB code you can write field1.caption, field1.format, etc. and dispaly or manipulate as you choose.

by thetechguy

How many kind of validation are you planning to do? You usually cannot validate text (string) fields other than not null (and empty string). But that's being taken care of by the database. (Access, I hope.) Have you tried the StdFormat or ADO's data binding feature, you can even bing formatting to each field.

Also if you can open the table and update & save the record, why can't you access the properties you mentioned? Are you using DAO or ADO? Try to clarify what is it you're trying to achieve and you'll get better answers.

This discussion is closed to new replies.