Recent content by Krij

  1. K

    problems with multiple relationships over multiple tables - see picture.

    Looking at your solution, you really just need one table with 'ClientID','ClientName','Descr'. Like Banana said: change to ClientName or something, try to normalize a little and have a main form for main table, insert all subform on this mainform and voilá.....It works fine for my database...
  2. K

    Data mix in the database...

    Designing a database requieres a good design with the tables. You need to see over your table relations and see if it is a way to more effectively relate tables. Also, having a combo to pick values like: 'Skriv inn skap/PLS nr' would automatically fill other textboxes if tables are related...
  3. K

    Write values to DB on click

    Best way would probably be to make an unbound form with unbound textboxes. Then a button, btnSaveMe and code: Dim strSaveData as String strSaveData = "INSERT INTO tblSomething(field1,field2,field3,field4) " _ & "SELECT field1,field2,field3,field4 " _ & "FROM tblUnbound " _ & "WHERE unboundID =...
  4. K

    two tables, linking same data

    Yes, these seems very suspicious! Anyway...do an INSERT INTO after the update of last field or make a button with the following code: Dim strFilter As string strFilter = "INSERT INTO tblreturns(returnnumber, datereceived,dateprocessed) " _ & "SELECT returnnumber, datereceived,dateprocessed "...
  5. K

    SubForm not Showing Updated Data

    If the underlying tables are related this should be of no problem. If not, you'll need to, by the code, insert values into the subtable by a INSERT INTO query or use the query tool, make the query and set it as the countrolsource of the form.
  6. K

    How can I add record in other table

    Dim strFilter As String strFilter = "INSERT INTO TPERSONAL(NAMEPER) " _ & "SELECT name " _ & "FROM TORDER " _ & "WHERE orderID = " & Me!ORDER!orderID CurrentDb.Execute strFilter, dbFailOnError This was for access 2000. My experience is that it is best to enclose these procedures in their own...
  7. K

    merge to word

    To automate with Word you'll need to create a new .dot document. In the document insert a table to hold the different values from fields in the table of the database. Then make bookmarks in each tablecell and give them apropiate names. Then you'll need to code in vba (in the database). Here's an...
  8. K

    Open form with data in field

    Hi! Are you opening the form from another form? With data already recorded? Then you should use the wizard to choose which form to open from a button on the first form. Then add more code to that button that will manipulate textbox on second form through: Forms!frmSecondForm!ClientType.Text =...
  9. K

    Open form with data in field

    Hi! Are you opening the form from another form? With data already recorded? Then you should use the wizard to choose which form to open from a button on the first form. Then add more code to that button that will manipulate textbox on second form through: Forms!frmSecondForm!ClientType.Text =...
  10. K

    Open form with data in field

    Hi! Are you opening the form from another form? With data already recorded? Then you should use the wizard to choose which form to open from a button on the first form. Then add more code to that button that will manipulate textbox on second form through: Forms!frmSecondForm!ClientType.Text =...
  11. K

    Problem with mixed records...!

    Where isn't the data in correct order? In the table(s)? In a listbox? If table(s): Do you have an autonumber field (e.g.:customerID)? How are your tables related?
  12. K

    Duplicate record and increment several fields

    The incrementing part could be done by: Nz(DMax("[aField"],"tblSomething"),1)+1 in code (behind a 'make copy' button). I'm not sure if you mean 'copy' the recordset or copy the document. Believing you mean 'copy the recordset', that is: copy an ordernumber into a new ordernumber and bringing...
  13. K

    Accessing rows in subform

    Thank you so much for patience and guidance. That did the trick. I was so convinced that I really needed the ItemID. :-)
  14. K

    Accessing rows in subform

    Hi! Yes, you're right. That's a typo. However... how is access supposed to know where to insert the ItemID if I don't tell which ItemID to insert where...? I think it should be possible to use a for..each statement here or...? Thank you for answering :-)
  15. K

    copying data on a subform

    Hi! Here's a way to copy an existing order with all its subforms data. From a button on mainform, paste and adjust the following code: Private Sub cmdCopy_Click() On Error GoTo Err_SENDCOPY Dim MyRs As DAO.Recordset Dim sqlNew As String Dim lngNewOID As Long Dim intONr As Integer Dim My2Msg As...
Back
Top Bottom