Results 1 to 10 of 10

Thread: Need Help!!!

  1. #1
    Join Date
    Feb 2006
    Posts
    7

    Unanswered: Need Help!!!

    Hi!
    Neesd help if anybody has an idea how to add records to the table.I have a drop down combo which adds new record to the first field but I wanted to add to the rest of the field in the Company table by typing the field which is unbound.
    Thank you

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by Nepali
    Hi!
    Neesd help if anybody has an idea how to add records to the table.I have a drop down combo which adds new record to the first field but I wanted to add to the rest of the field in the Company table by typing the field which is unbound.
    Thank you
    It is better to use microsoft activex data object libraries for this case.
    First add reference to one of those library.Then create a connection and recordset object.And using Addnew method u can easily add/modify/delete any data from adtabase. And yes , don't use a combo that way.Write a Sub procedure to populate combo using recordset.
    I hope this will do your job.
    Joydeep

  3. #3
    Join Date
    Feb 2006
    Posts
    7
    [QUOTE=rudra]It is better to use microsoft activex data object libraries for this case.
    First add reference to one of those library.Then create a connection and recordset object.And using Addnew method u can easily add/modify/delete any data from adtabase. And yes , don't use a combo that way.Write a Sub procedure to populate combo using recordset.
    I hope this will do your job.
    Joydeep[

  4. #4
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    [QUOTE=Nepali]
    Quote Originally Posted by rudra
    It is better to use microsoft activex data object libraries for this case.
    First add reference to one of those library.Then create a connection and recordset object.And using Addnew method u can easily add/modify/delete any data from adtabase. And yes , don't use a combo that way.Write a Sub procedure to populate combo using recordset.
    I hope this will do your job.
    Joydeep[
    What that mean??? Are u trying to answer yourself with my words
    Joydeep

  5. #5
    Join Date
    Feb 2006
    Posts
    7
    No I am not. I have a created a db with drop down combo box where u can add a new company i have this made with not in list ( event and by codes) functioning.This form has two parts this dropdown list not in list when I add goes to company table with all information and the other subform when I enter the new record goes to invoice table where the new records adds but gets duplicate with only the company ID.
    If you know why this is happening??
    the form is based on a query with company and invoice tbl.
    Thanks!

  6. #6
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by Nepali
    records adds but gets duplicate with only the company ID.
    It is better if you post the query here....I mean the table structure and the query that u are using in invoice form.
    Joydeep

  7. #7
    Join Date
    Feb 2006
    Posts
    7
    records adds but gets duplicate with only the company ID
    Ok
    I have two tables tblCompany & tblinvoice. I wanted to enter records in a form both so the new records can be added to tblinvoice.I have a drop down combo box for tblCompany where if it is a new company i can add a new company to tblCompany.Everything is fine only in the tblinvoice it is adding up one extra row in invoice tbl.
    what query u want to look at it???
    Thanks!

  8. #8
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by Nepali
    records adds but gets duplicate with only the company ID
    Ok
    I have two tables tblCompany & tblinvoice. I wanted to enter records in a form both so the new records can be added to tblinvoice.I have a drop down combo box for tblCompany where if it is a new company i can add a new company to tblCompany.Everything is fine only in the tblinvoice it is adding up one extra row in invoice tbl.
    what query u want to look at it???
    Thanks!
    Paste the code that you are using to update the table.By query I mean to say the insert statement that you are passing to the conn.execute.If you are using Addnew method then just past the code of that form.
    I hope now you have understood.
    Joydeep

  9. #9
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    POST the code you're using to currently populate the combo box, as well as table names and field names/types for the two tables.

    Otherwise, we're just guessing at answers. Help us help you.
    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


  10. #10
    Join Date
    Feb 2006
    Posts
    7
    Thanks.
    Problem I had was duplicating record after closing the form. I had created delete query to delete the duplicate record.Now the problem is solved.I had that in on close event of the form.Where I put
    DoCmd.OpenQuery ("QryDeleteDuplicate")
    And this worked.Everytime I close it deletes the duplicate record.

Posting Permissions

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