Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Best approach (Access 03)

    I have a main form = frmEmployees. On a tab control I have frmSalary, on that there is subfrmSalary which then has subfrmSalarylisting.
    These are all tied together using EmployeeID.

    frmSalary is to allow me to tied in to a job action ID table which is autonumbering any job actions taken. The tblJobActionID will be accessed by a series of different tables to retreive a jobactionID number for different types of actions such as changes in salary, disciplianary action, title changes, etc. Later then I can pull all job actions and report them by employee. On frmSalary there are three controls JobActionID, EmployeeID, and JobAction.

    On this first sub form, frmSalary currently JobActionID displayes the first JobActionID for that employee. I want nothing showing in the JobActionID and JobAction. How do I best do this? I put DoCmd.GoToRecord , , acNewRec in the Open event for frmSalary. Which works when the frmEmployee is open. It doesn't if you change to a new employee.

    My bottom line question, I guess, is how is the best way to have a sub form always come up ready to accept new data and not show previous data? And once you change to a different employee using a combo box as a locator do you get the controls again change and be clear?

    Thanks Fay

  2. #2
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Best approach (Access 03)

    If you always want the form to be for new data, have you tried setting the Data Entry property? (for the form the subform is based on)
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Best approach (Access 03)

    Bless you. There are so many different ends and outs of Access it always leaves me frustrated and looking stupid, but persistent. Thank you for your help.

  4. #4
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Best approach (Access 03)

    I got the above working. But now what happens when I enter the job action on the frmSalary and tab to the next cell to enter data the top form goes back to Autonumber and the JobActionID number is not transferred to the next subform. It did appear on the subform up to the point of tabbing. What is going on? Fay

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Best approach (Access 03)

    By tabbing out of JobAction, you probably jumped to a new record. If you don't want this to happen, set the Cycle property of frmSalary (in the Other tab of the Properties window) to Current Record instead of All Records.

  6. #6
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Best approach (Access 03)

    Thanks Hans. As always you have the answer and I appreciate your assistance. Fay

Posting Permissions

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