Results 1 to 4 of 4

Thread: Access 97 Help

  1. #1
    Join Date
    Apr 2009
    Posts
    15

    Unanswered: Access 97 Help

    Good Afternoon folks.

    Im having a bit of trouble with a project im currently working on, and i hope you guys can help.

    This is my scenario, I have 2 tables, laid out like this

    Cars Table

    CarID
    Car Description

    Car Extension Table
    CarID
    CarParentID


    I have a combo on a form that you can select the CarParent and the box is unbound, (but I use a query to fill the combo with all CarParents, these Car Parents are actually linked to the Car table as I want to use the same car names and CarID's, but populate them in the CarParentID field.)

    What i am battling with is trying to update the CarParentID on the Car extension table, based off of what I select in the combo box, and make it retrieve the correct car parent when i scroll between forms.

    I know it might seem confusing, but this is the best way i could explain...

    Thanks!

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Have another go at explaining the problem?

    How can a car have a parent?
    What is the car extension table storing?
    What is the form's SQL?

    Clearly, I have nothing but questions
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Apr 2009
    Posts
    15
    Sure Ill try.

    I am basically stuck in one point here. Im trying to populate data into a textbox from a recordset I create. This is just a plain textbox with no strings attached, however when I run my code it pops up with

    "Error 2135, this property is read-only and can't be set". I cant understand why this would be a problem.

    This only happens when the DB is in runtime mode, when I am in the design mode for this particular form and run it to test it works.


    Here is a snippet

    Dim rs As Recordset

    Set rs = CurrentDb.OpenRecordset("SELECT a.Vendor_Name from Vendor_Remote a inner join VendorExt b on a.Vendorid = b.Parentid where b.VendorID = " & Me.VendorId)

    If rs.EOF Then
    txtParent.SetFocus
    txtParent.Text = vbNullString
    Else
    txtParent.SetFocus
    txtParent.Text = rs.Fields("Vendor_Name")
    End If

    rs.Close
    Set rs = Nothing

  4. #4
    Join Date
    Apr 2009
    Posts
    15
    Update :

    Fixed my problem by dumping the data into a Label.

Posting Permissions

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