Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Edit a form (Access 2000)

    Can somebody help me ? i want to find an order from the list and then open the form and the subform in order
    to edit this order.I am sending an atachement.i hope my question will be easy for the professionals and therefore
    i have not included the tables.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit a form (Access 2000)

    Since you didn't include the tables, the following is air code, I haven't been able to test it:

    Private Sub Command577_Click()
    Dim rst As Object
    If Me.List575.ListIndex = -1 Then
    MsgBox "Please select an order!", vbExclamation
    Me.List575.SetFocus
    Exit Sub
    End If
    Set rst = Me.Recordset.Clone
    rst.findfirst "OrderID=" & Me.List575
    If Not rst.EOF Then
    Me.Bookmark = rst.Bookmark
    Me.<!t>[Forder details extended]<!/t>.SetFocus
    End If
    Set rst = Nothing
    End Sub

  3. #3
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit a form (Access 2000)

    Thank you for your reply.I tried to make abrdiged tables and i am sending them together with the form,and i am waiting for your comments.

    regards

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit a form (Access 2000)

    The On Focus event of the combo box on the subform contains a function that is not present, and its Row Source property refers to fields that are not present in the Products table. If I correct that, the command button on the main form seems to work the way you asked. What is your problem?

  5. #5
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit a form (Access 2000)

    Thank you for your reply.I have removed the OnFocus function corrected the Row source property.
    My aim is to edit preivious orders.For example,if i want to edit order Nr 1, i must click order

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Edit a form (Access 2000)

    The form FOrderInformation has its DataEntry property set to yes. this means that the form always opens to a new blank record.

    Change this to No , and it will show you old records, then your code will work.
    Regards
    John



  7. #7
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit a form (Access 2000)

    Thank to you all. Things are working fine now.One of the greatest things in this unique forum is that you are able to give the right answer to every quesion.
    Thanks again.
    I would like to ask now, after i have my question answered,what is the right code to turn the form back to its original consition?
    I mean to set the form to DataEntry to Yeas again by means of a code.Something of the order Me.dataEntry = True ?

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit a form (Access 2000)

    Yes, that is possible, but why do that? The user can click the NRw Record button on the toolbar or in the navigation buttons to go to a new record.

  9. #9
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit a form (Access 2000)

    some of the users in my compnay are not so good users and secondly i dont want to change their habit.And also it is much easier for everyday use to have the Data Entry set to Yes

    regards

Posting Permissions

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