Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Unanswered: Send information to a table

    Hi guys,

    I am on a form a form called Frm_LNA and I have two fields called Personal_Ref and Course_Ref. What I need to do is to send the information that is contained in this text boxes to a record in a table called Tbl_TNA.

    I've tried using tbl_TNA as the record source and doing add new record but this causes some problems on other parts of the form.

    Can you please advise on how to send the two values to this table? I have had a look through the forum but can't find the answer I need.

    Many thanks,

    Christy

  2. #2
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Binding a form to a data source is then way to go. There are other ways but I wouldn't recommend them unless you have good reason or are pretty experienced.

    If you are having problems with other data on the form when you specify a record source, then I suspect you haven't quite got your data structure right. Perhaps you could explain a little more about the structure:
    - What does the form represent in terms of data (and therefore which table should it be bound to (what does Frm_LNA mean and tbl_TNA mean ? I know they refer to your form and table but what are they supposed to represent ?) .
    - How do Personal_Ref and Course_Ref figure in relationship to what the form represents ?
    - How does the problem data figure in relationship to what the form represents ?

    Regards
    Chris

  3. #3
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82

    update query

    you could try using an append or update query, if your form is based to say table 1 and you want some of the data to go to table 2 then you can use a command button or on event to run an append query that will append the required data to another table.

  4. #4
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Thanks but its done now

    Hi all, thanks for your advice, but we managed to solve this now.

    Basically the aim was to have two tables. One of avaliable needs and one with selected needs. Double clicking the abvaliable needs would create a record in tbl_LearningNeeds. We couldn't bind it because it caused problems with other functions like removing them from the list so we wanted something that sent the information directly when double clicking the record which we've now fixed using;

    strSQL = "INSERT INTO Tbl_LearningNeeds (Personal_Reference, Course_ID) VALUES (" & Me.Val_Employees & " , " & Me.Val_Courses & ")"
    DoCmd.SetWarnings False

    It was complicated for us but we needed to get it extremly simpled for when we distribute it.

    Thanks for your advice though

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by christyxo
    Hi all, thanks for your advice, but we managed to solve this now.

    Basically the aim was to have two tables. One of avaliable needs and one with selected needs. Double clicking the abvaliable needs would create a record in tbl_LearningNeeds. We couldn't bind it because it caused problems with other functions like removing them from the list so we wanted something that sent the information directly when double clicking the record which we've now fixed using;

    strSQL = "INSERT INTO Tbl_LearningNeeds (Personal_Reference, Course_ID) VALUES (" & Me.Val_Employees & " , " & Me.Val_Courses & ")"
    DoCmd.SetWarnings False

    It was complicated for us but we needed to get it extremly simpled for when we distribute it.

    Thanks for your advice though
    And don't forget to set your warnings back to TRUE......

    BUD

Posting Permissions

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