User Profile

Collapse

Profile Sidebar

Collapse
ndhvu
ndhvu
Last Activity: Sep 14 '10, 10:52 AM
Joined: Sep 6 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • After search, I intent to use these code for Insert task:

    Code:
        Dim db As Database
        Dim rst1 As Recordset
        Dim rst2 As Recordset
        Dim rst3 As Recordset
        Dim rs As Recordset
        
        Dim buyHeaderId As Long
        Dim wrk As Workspace
    
        Set wrk = DBEngine.Workspaces(0)
        Set db = DBEngine.Workspaces(0).Databases(0)
        
        wrk.BeginTrans
    ...
    See more | Go to post

    Leave a comment:


  • If you ask if after i click [Save] button, the data on the main-form and sub-form will be insert/update to both table, then the answer is Yes.

    If users close the form, then data simple won't be insert/update into DB

    This is but a simple project for daily tasks for a small office, so a simple solution will be preferred.
    See more | Go to post

    Leave a comment:


  • 1) The insert form and update form have same structure and I want to find an approach that can work well with both of them in order to reduce the writing and maintenance time (or so I hope), since I also have some other forms with the same relationship.

    2) I have no idea I can be that much :), but it still be better if there is a way to TRUNCATE the table. But well, my boss doesn't even care about how the project run anyway. Just make...
    See more | Go to post

    Leave a comment:


  • Thanks for your reply :).
    I just got the same idea about making tables to hold data temporary, transfer and then delete all record after finish. The problem are:
    1. Work well with insert but not with update. using this way for update data meaning i have to delete the old data and insert a new one. It ill disrupt the order of records (or at least that is what I think) and making the 2nd problem happen faster.
    2. Use up a lot of...
    See more | Go to post

    Leave a comment:


  • Access 2003: Insert/Update records by form with subform using VBA

    Tables: Buy_Header and Buy_Detail.
    - Buy_Header: info. of each buy (buy_id(PK, auto number), date, shop, bought_by, ...)
    - Buy_Detail: info. of each item from each buy (buy_detail_id( PK, auto number), buy_id, item_name, price, quantity,...)

    Target:
    - Make a main-form of table [Buy_Header] with sub-form of table [Buy_Detail] to insert/update records for both tables. Each form of each [Buy_Header] and the sub-form can...
    See more | Go to post
No activity results to display
Show More
Working...