PLease someone help me, editing fields in Access database using MS Visual Basic 5.0 
Author Message
 PLease someone help me, editing fields in Access database using MS Visual Basic 5.0

I am creating a Visual Basic app which will be used to test proficiency
levels for employees.  I am using MS Access as the database engine.  I have
two tables;

1.)    Employee Data: (Last Name),( First Name), (Employee Number), (Date),
(Test Score)

2.)    Proficiency Test: (Questions), (Correct Answer), (Your Answer)

How can I clear the records in the field (Your Answer) automataically when
the program is initiated?

I have been struggling with the program and I cannot seem to resolve the
problem.  data1.recordset.edit seems to be the appropriate tool, but I don't
understand how to use it.

Any help would be greatly appreciated.



Wed, 21 Mar 2001 03:00:00 GMT  
 PLease someone help me, editing fields in Access database using MS Visual Basic 5.0
Make a Table called "ANSWERS" and name the field "YourAnswers"
remove it form the second Table. Then create a sql statement in the
Form_Load to delete all the records in the ANSWERS Table, before
you load the rest of the database. This way the answers will all ways
be blank when the database is loaded. Also make sure that you have
Allow Zero Length in Access set to yes, that way if the answer is left
empty you will not get a error.

HTH,

etta

Quote:

>I am creating a Visual Basic app which will be used to test proficiency
>levels for employees.  I am using MS Access as the database engine.  I have
>two tables;

>1.)    Employee Data: (Last Name),( First Name), (Employee Number), (Date),
>(Test Score)

>2.)    Proficiency Test: (Questions), (Correct Answer), (Your Answer)

>How can I clear the records in the field (Your Answer) automataically when
>the program is initiated?

>I have been struggling with the program and I cannot seem to resolve the
>problem.  data1.recordset.edit seems to be the appropriate tool, but I
don't
>understand how to use it.

>Any help would be greatly appreciated.



Wed, 21 Mar 2001 03:00:00 GMT  
 PLease someone help me, editing fields in Access database using MS Visual Basic 5.0
I found a better way!!  this is what I did on the form initialize;
    Do While counter < records
        If Data2.Recordset.youranswer <> "" Then
            Data2.Recordset.Edit
            Data2.Recordset.youranswer = ""
            Data2.Recordset.Update
            Data2.Recordset.MoveNext
        Else
            Data2.Recordset.MoveNext
        End If
        counter = counter + 1
    Loop

It works just the way I wanted.  Whew!!

Thanks you for your suggestion though.

Quote:

>Make a Table called "ANSWERS" and name the field "YourAnswers"
>remove it form the second Table. Then create a sql statement in the
>Form_Load to delete all the records in the ANSWERS Table, before
>you load the rest of the database. This way the answers will all ways
>be blank when the database is loaded. Also make sure that you have
>Allow Zero Length in Access set to yes, that way if the answer is left
>empty you will not get a error.

>HTH,

>etta


>>I am creating a Visual Basic app which will be used to test proficiency
>>levels for employees.  I am using MS Access as the database engine.  I
have
>>two tables;

>>1.)    Employee Data: (Last Name),( First Name), (Employee Number),
(Date),
>>(Test Score)

>>2.)    Proficiency Test: (Questions), (Correct Answer), (Your Answer)

>>How can I clear the records in the field (Your Answer) automataically when
>>the program is initiated?

>>I have been struggling with the program and I cannot seem to resolve the
>>problem.  data1.recordset.edit seems to be the appropriate tool, but I
>don't
>>understand how to use it.

>>Any help would be greatly appreciated.



Thu, 22 Mar 2001 03:00:00 GMT  
 PLease someone help me, editing fields in Access database using MS Visual Basic 5.0
I have had problems with the spaces in my data fields.  Hope this helps.

    with data1.recordset
        .edit
        !Your Answer = " "
        .Update
    end with


Quote:

>I am creating a Visual Basic app which will be used to test proficiency
>levels for employees.  I am using MS Access as the database engine.  I have
>two tables;

>1.)    Employee Data: (Last Name),( First Name), (Employee Number), (Date),
>(Test Score)

>2.)    Proficiency Test: (Questions), (Correct Answer), (Your Answer)

>How can I clear the records in the field (Your Answer) automataically when
>the program is initiated?

>I have been struggling with the program and I cannot seem to resolve the
>problem.  data1.recordset.edit seems to be the appropriate tool, but I
don't
>understand how to use it.

>Any help would be greatly appreciated.



Sun, 25 Mar 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Regarding Accessing External database using MS-Access and MS-Visual Basic

2. Using MS Access database with Visual Basic 5

3. Saving Visual Basic Image into a Field in MS Access Table

4. How do I access Access database over the internet using Visual Basic

5. Visual Basic, Access Basic or MS-Access??

6. Visual Basic, Access Basic or MS-Access??

7. Using MS Access objects with Visual Basic 5

8. Change Access table field width using Visual Basic

9. Changing an Access field width using Visual Basic

10. NEED HELP WITH VISUAL BASIC 4.0 32-BIT SOMEONE HELP

11. MS Visual Basic -> MS Access via ODBC

12. CA-Prog Analyst, MS SQL Server, Visual Basic and MS Access

 

 
Powered by phpBB® Forum Software