User Profile

Collapse

Profile Sidebar

Collapse
pld60
pld60
Last Activity: Dec 8 '09, 05:28 PM
Joined: Aug 6 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pld60
    replied to Problem with auto number 2 tables
    I keep playing with this and can not get the autonumber from Table1 to propagate to other tables. I know that this must be simple, I must be too simple
    See more | Go to post

    Leave a comment:


  • pld60
    replied to Problem with auto number 2 tables
    I can't get this to work. Do i need to add some code n my on-Click to add the id from my primary table to other tables so I can keep the relationship?
    See more | Go to post

    Leave a comment:


  • pld60
    replied to Problem with auto number 2 tables
    ChipR

    How do I do this. The relationship must be maintained
    See more | Go to post

    Leave a comment:


  • pld60
    started a topic Problem with auto number 2 tables

    Problem with auto number 2 tables

    Making progress with my data base but have run into a snag.

    Working with an unbound form that place data into more than one table using a "save" button with this code.
    Code:
    Private Sub Commandsaverecord_Click()
       
        Set db = CurrentDb
    Set rst = db.OpenRecordset("Table1")
    With rst
    .AddNew
    !DATE = Me.DATE
    !SHIFT = Me.SHIFT
    !SUPERVISOR = Me.SUPERVISOR
    ...
    See more | Go to post
    Last edited by NeoPa; Sep 8 '09, 06:58 PM. Reason: Please use the [CODE] tags provided.

  • pld60
    replied to Exit subform to main form
    Thanks to everyone for your help. FishVal had it. This is what worked

    [Forms]![FORM 1].[SFrm_Res2].SetFocus
    [Forms]![FORM 1].[SFrm_Res2].[Form].[Resident2].SetFocus

    Now is there any way to have the subforms update tables only after I click the save button on the main form?
    See more | Go to post
    Last edited by pld60; Aug 31 '09, 07:46 PM. Reason: typo

    Leave a comment:


  • pld60
    replied to Exit subform to main form
    Thanks for everyones help but it is still not working. Now it does nothing. No error message.
    See more | Go to post

    Leave a comment:


  • pld60
    replied to Exit subform to main form
    Ok, I placed this code
    Private Sub [Staff1]_LostFocus()

    Me.Parent![<SFrm_Staff2>].Form![Staff2].SetFocus

    End Sub

    The Field that I am trying to tab to tab to is [Staff2] in the SubForm SFrm_Staff2

    What am I doing wrong? When I tab the first time nothing happens. Hit tab a 2nd time and I get the error message, can't find the Field <SFrm_Staff2> referred to in your ...
    See more | Go to post

    Leave a comment:


  • pld60
    replied to Exit subform to main form
    Private Sub [Last Field in Tab Order in Sub-Form]_LostFocus()
    Me.Parent![PackingDate].SetFocus
    End Sub
    This works great to tab from the subform to the main form. How about going to a second subform? I can't figure out what to place in the 2nd line to give focus to a field in a subform.
    See more | Go to post

    Leave a comment:


  • pld60
    replied to query that counts from 3 fields
    Thanks for your help but, this does not work. I do not need away of prioritizing at all, that is done on the incident report when writen and then it is put in the fields accordingly. May be there is not a simple way of doing this?
    See more | Go to post

    Leave a comment:


  • pld60
    replied to query that counts from 3 fields
    I may not have been clear. Each record in the table is an incident. So, if there is an incident report writen only Smith is involved then Smith is entered in the field [Staff 1]. If Smith and Jones are both involve then Smith is entered in the field [Staff 1] and Jones is entered in the field [Staff 2] or Jones is entered in the field [Staff 1] and Smith is entered in the field [Staff 2]. [Staff 1] would be the most involved etc.

    If...
    See more | Go to post

    Leave a comment:


  • pld60
    started a topic query that counts from 3 fields

    query that counts from 3 fields

    I have a data base that keeps track of incident reports. There may be 1, 2, or 3 staff involved in an incident. There are fields [staff 1], [staff 2], and [staff 3] in one table. A staff name may show up in any of the 3 fields. I have queries that show staff count in each field. The question is how do get one total, ie

    Smith is in [Staff 1] 3 times, [Staff 2] 1 time, and [Staff 3] 2 times for a total of 6.
    Jones is in [Staff...
    See more | Go to post
    Last edited by pld60; Aug 24 '09, 02:27 PM. Reason: typo

  • pld60
    replied to Command button to save record
    mshmyob

    What would that look like?
    See more | Go to post

    Leave a comment:


  • pld60
    started a topic Command button to save record

    Command button to save record

    I have a bound form to a table.
    I have a command button to save when clicked that uses the following code.

    Private Sub Commandsavereco rd_Click()
    On Error GoTo Err_Commandsave record_Click


    DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

    Exit_Commandsav erecord_Click:
    Exit Sub

    Err_Commandsave record_Click:
    MsgBox Err.Description...
    See more | Go to post

  • acViewPreview is what I needed, thanks for the help
    See more | Go to post

    Leave a comment:


  • Thanks for the responses. ChipR I tried this code and it does the same thing.
    See more | Go to post

    Leave a comment:


  • I should have added the code for the comand button

    Private Sub Command14_Click ()
    Me.Visible = False
    DoCmd.OpenRepor t "Incident Report by Month", acViewNormal, acEdit
    DoCmd.Close acForm, "Report by Month"

    End Sub
    See more | Go to post

    Leave a comment:


  • Ok, I created a form that asks for month # and year with a comand button that opens the report and enters the entered month and year for the queries. Everything works great except the report automatically prints and never opens. It prints the correct information. How do I fix it so it just opens the report to review and then can be printed by clicking on print?
    See more | Go to post

    Leave a comment:


  • How do I have a report ask for parameters just one time?

    I have 2 queries each with parameters to select month and year [Enter Month #] and [Enter Year]. Both do exactly as I want. When I run a reports based on the 2 queries they work great. How do I run both queries in one report and have it ask for the parameters just once? One report is run as a subreport.
    See more | Go to post
No activity results to display
Show More
Working...