Data form wizzard

Data form wizzard

Post by Denni » Sun, 21 Jan 2001 07:06:22



I had the wizzard create a data form to display the contents of an
Access table.  Problem is that I get nothing but errors relating to the
code!  I chose to have the wizzard use ADO code instead of the control,
and not allow the editing controls (Refresh & Close only).  Has anyone
ever got the wizzard to make useable code?  I have VB6, SP-4.

Dennis,

 
 
 

Data form wizzard

Post by Cadet Haw » Sun, 21 Jan 2001 08:43:29


Dennis,
Make sure before you start the wizard that you have the references for the
Microsoft ActiveX Data Objects 2.5 library and the Microsoft ActiveX Data
Objects Recordset 2.5 library.
To reference them go to Project then References and look for them and but a
check mark in both.
Let me know if this helps.


Quote:> I had the wizzard create a data form to display the contents of an
> Access table.  Problem is that I get nothing but errors relating to the
> code!  I chose to have the wizzard use ADO code instead of the control,
> and not allow the editing controls (Refresh & Close only).  Has anyone
> ever got the wizzard to make useable code?  I have VB6, SP-4.

> Dennis,


 
 
 

1. VB6 and Data Form Wizzard

Hi,

This might seem a little bit lhamme but...i'm developing an application
and i created some forms with the Data Wizzard, using the option of
"ADO code".
So far so good...but i have 2 problems now because i don't have the MSDN
cd, and so i can't access the help files:

1o I made a Function "Search" that contains a variable (variant) named
"criterio$" and contains a certain SQL code which performs a search in a
determined table of  the database. In VB5 and using the the data
control, i could do that by typing the following code in the Function:

**************************************************
Public Sub Pesquisa() 'Executs the search

Dim criterio$
Dim count As Integer

    count = 0

    criterio$ = "SELECT * FROM Register"
    If (Text1 <> "") Then If (count = 0) Then criterio$ = criterio$ + "
WHERE" Else criterio$ = criterio$ + " AND"
    If (Text1 <> "") Then criterio$ = criterio$ + " user LIKE '*" +
Text1.Text + "*'"
    If (Text1 <> "") Then count = count + 1

...

---> datPrimaryRS.RecordSource = criterio$ <---
        datPrimaryRS.Refresh
        Searching = True
...
************************************************

but now...the "data control" has the name of adoPrimaryRS and it doesn't
work, because it seems that the "RecorSource" statement is already
included in the data control. What can i do so my search code can be
used in this application too ???

2o I added a "checkbox" to the form (created with data wizzard ado code
too) which was supposed to be  associated to a certain field in my
database, but i can't do that because i can't find a way to associate
the object to the database and make it work with the rest of the
textboxes (which are associated to the DB and were criated with Data
Form Wizzard)

Sorry for a long boring mail but...i'm really desesperated :(
Thans in Advance

Jos Paulo

2. Software Protection For Visual Basic

3. Oracle 8 USERS_SESSIONS ???

4. Problems with Form Wizzard in DAO 3.6

5. Calculating with SQL ?

6. ADO,Form WIzzard

7. New True Grid Data Wizzard For VB3 !!!!!

8. Sending data from one form to another (VBA and Access 97 form)

9. copy form data from existing to new form

10. Strange Behavior in Data Form Wizard created Form

11. Keeping data from form to form