Results 1 to 7 of 7

Thread: Access Database

  1. #1
    Join Date
    May 2012
    Posts
    4

    Red face Unanswered: Access Database

    I am designing an access database. I want to use a text box on the form from the a date value entered will populate all the date fields on the form. I tried to use the following with a button:

    Me.Record_Date.Value = Me.txtDate.Value

    but it will only populate one field at a time on the click of the button.

    I need help to go round this.

    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is this an Access problem, IE you are developing entirely in Access)
    or is this an VB problem Ie you are writing code in VB to 'talk' to an Access/JET datastore
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2012
    Posts
    4

    Red face

    I am developing the database in access but I want to use VB to enable me populate the multiple fields with same date value, unless there is a way of doing it in access.
    Thanks

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    More information is going to be needed...

    Which version of VB? (the standalone version - NOT the VBA which exists in the MS Access environment.) From the code, it appearsto be legacy VB (VB 6/5.)

    You also don't say how you're connecting to the Access database - are you using ADO or DAO?

    How are you loading your recordset?

    How many date fields are you needing to update? Are there multiple date fields on each record, or multiple records with 1 date field each, or multiple records with multiple date fields on each record?

    You might attach a screen dump of the form in question.

    Note that Access allows you to create forms to display/update data. It has VBA (limited form of VB, for use within the Access environment) that can be used when needed for more complex tasks.
    Last edited by loquin; 05-17-12 at 16:10.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  5. #5
    Join Date
    May 2012
    Posts
    89
    I'm trying to make a button to be False when 3 fields have no value how do i do this...???
    Please help!!!

  6. #6
    Join Date
    May 2012
    Posts
    4

    Red face Access database

    I am developing in Access 2010. I need to use a button which will add the date value in an unbound text box to update ALL the date fields on the FORM.
    The text box name is txtDate and the date field is Record Date.
    Thanks.

  7. #7
    Join Date
    May 2012
    Posts
    4
    I tried this but it wont work and I have an error:
    Item not found in this collection!

    Private Sub cmdAddDate_Click()
    Dim rst As DAO.Recordset

    Set rst = Me.Recordset

    Do Until rst.EOF
    With rst
    .Fields(Record_Date) = txtDate.Value
    .Update
    .MoveNext
    End With
    Loop

    rst.Close
    Set rst = Nothing
    End Sub

Posting Permissions

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