Results 1 to 6 of 6

Thread: RuntimeBug

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    south africa
    Posts
    16

    Post

    There is this form that has textboxes which saves to the database.
    Each time this form is opened at runtime, previuosly saved data appear on the textboxes.

    What can I do to open a run a clean form?

    thank you!

    --------
    bon


  2. #2
    Lively Member Maartin's Avatar
    Join Date
    Jan 2000
    Location
    Benoni, Gauteng, South-Africa
    Posts
    99

    Post

    Do you bind the textboxes to a datacontrol and the datacontrol to the database ?

    If you have, the only way so far that I have seen that solves the problem is to use a recordset and not the datacontrol.

    I'll ask around here. Somebody had the same problem. Maybee they know.

    ------------------
    Have Fun.
    Maartin.
    [email protected]
    -----------------------


  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    south africa
    Posts
    16

    Post


    Yes Maartin, my textboxes have been binded to a datacontrol and the datacontrol to the database.

    Does this has to do with the EOF or BOF functions?, because the problem is that my form does not refresh.

    Please help.

  4. #4
    Lively Member Maartin's Avatar
    Join Date
    Jan 2000
    Location
    Benoni, Gauteng, South-Africa
    Posts
    99

    Post

    Bon.

    I will ask the juniours in office they also use data controls for their projects. I tend to prefer useing recordsets, more controls less problems. I know one of them had this same problem, if they fixed the error and still use the datacontrol, I will give you the answer, other wise sorry sad news but recordsets will be the answer from me.


    ------------------
    Have Fun.
    Maartin.
    [email protected]
    -----------------------


  5. #5
    Lively Member Maartin's Avatar
    Join Date
    Jan 2000
    Location
    Benoni, Gauteng, South-Africa
    Posts
    99

    Post

    Got some sort of answer for you.

    You must check the state of you edit mode before you change the edit mode to something else.

    Apperently it fixed her error.

    ------------------
    Have Fun.
    Maartin.
    [email protected]
    -----------------------

  6. #6
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    I agree that data controls are a bit old hat these days but when you may find when you start an AddNew

    ie; DataControl1.Recordset.AddNew

    the boxes will clear as they a ready for a new record.

    (don't forget to do a .Update on the "SAVE" button or the data will be lost)

    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width