User Profile

Collapse

Profile Sidebar

Collapse
Sandra Walsh
Sandra Walsh
Last Activity: Nov 23 '12, 10:12 PM
Joined: Nov 8 '11
Location: Toronto, ON
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sandra Walsh
    replied to Simple UPDATE query not running
    UPDATE:

    The Update query runs when I do a MAKE TABLE on the second query and use the TEMP table instead of q_ADMIN_MergedC ontactIDs.

    Code:
    UPDATE Temp_UpdatedContactIDs INNER JOIN t_RelatedContacts ON Temp_UpdatedContactIDs.Old_ID = t_RelatedContacts.Contact_ID SET t_RelatedContacts.Contact_ID = [Temp_UpdatedContactIDs].[New_ID];
    See more | Go to post

    Leave a comment:


  • Sandra Walsh
    started a topic Simple UPDATE query not running

    Simple UPDATE query not running

    I am getting the error "Operation must use an updateable query" when I run the following Query:

    Code:
    UPDATE q_ADMIN_MergedContactIDs 
    INNER JOIN t_RelatedContacts ON q_ADMIN_MergedContactIDs.Old_ID = t_RelatedContacts.Contact_ID 
    SET t_RelatedContacts.Contact_ID = [q_ADMIN_MergedContactIDs].[New_ID];
    t_RelatedContac ts only has 4 number fields:
    RelCon_ID - AutoNumber
    Contact_ID...
    See more | Go to post

  • Got it!

    In the AfterUpdate event of f_ActivityDetai ls_SFC
    (which is related to the main form as
    [Forms]![f_MainTripForm_ Admin]![f_ActivityDetai ls_SFC])

    Code:
    Private Sub Form_AfterUpdate()
    
    Forms![f_MainTripForm_Admin]![ActivityDetailsDatasheet].Form.Requery
    
    End Sub
    So simple - thanks Z!!
    See more | Go to post

    Leave a comment:


  • Hello Z

    Confirming that
    Subform1: f_ActivityDetai ls_SFC - is subform to Mainform
    Subform2: f_ActivityDetai ls_Datasheet - is subform to Mainform

    f_ActivityDetai ls_Datasheet mimics [or rather, is supposed to mimic ;)] a splitform function for the f_ActivityDetai ls_SFC

    The records already update correctly when there is a change in Mainform. I need the view of the records in f_ActivityDetai ls_Datash...
    See more | Go to post

    Leave a comment:


  • Thanks Z -

    Reposted here.
    See more | Go to post

    Leave a comment:


  • Recordset in datasheet subform not updating when data is updated in formview subform

    Hello All -

    I have a main form called f_MainTripForm_ Admin with a split view. The main form has fields relating to a trip.

    The main form has 2 sub forms. The subforms have fields related to activities that occured on a trip, eg meetings. One trip can have many meetings assoicated with it:

    SubForm 1 - f_ActivityDetai ls_SFC: Form with tab control view of activity-related fields for one Activity
    SubForm...
    See more | Go to post

  • Hello Z -

    I reworked the code (below) and the Activity records are now loading correctly.

    The issue I have now is that the recordset in f_ActivityDetai ls_Datasheet does not update when I edit, delete or add an Activity in ActivityDetails _Admin.

    f_ActivityDetai ls_Datasheet has the following properties:
    DataEntry = No
    Allow Additions, Deletions, Edits and Filters = Yes

    I dont...
    See more | Go to post

    Leave a comment:


  • Split form sub-records showing as form instead of datasheet

    Hello -

    I have a main form with a record source of t_Trips.
    Main form has a split form default view.
    In the properties for the t_Trips table, the Subdatasheet name is set to Table.t_Activit ies

    I have a sub-form called f_ Activities on the Main form linked by Trip_ID.
    f_ Activities displays the Activity_ID of the current Activity.

    When I click on the + sign in my split form, I see the Form...
    See more | Go to post

  • Get data in one subform to load before onCurrent event of other subform

    I have a main form called f_MainTripForm_ Admin with a split view. The main form has fields relating to a trip.

    The main form has 2 sub forms. The subforms have fields related to activities that occured on a trip, eg meetings. One trip can have many meetings assoicated with it:
    SubForm 1 - f_ActivityDetai ls_SFC: Form with tab control view of activity-related fields for one Activity
    SubForm 2 - f_ActivityDetai ls_Datasheet:
    ...
    See more | Go to post

  • Thanks Seth - great idea.

    This worked perfectly!

    Code:
    [Forms]![f_MainTripForm_Admin].SetFocus
    [Forms]![f_MainTripForm_Admin]![ButtonName].SetFocus
    many thanks,
    Sandra
    See more | Go to post

    Leave a comment:


  • Thanks guys.

    Z: I am using the default splitform option in Access 2010

    Seth: Yes, I am clicking a record in the datasheet/splitform view and triggering the OnCurrent event that changes what controls are visible on the Main form view.
    See more | Go to post

    Leave a comment:


  • SetFocus to a Form control when cursor is in Split Form datasheet

    Hello -

    I have a Main form with a Split Form view.

    I have an OnCurrent event that runs when the user selects a different record in the Split Form.

    The first part of the OnCurrent event is as follows:

    Code:
    [Forms]![f_MainTripForm_Admin].SetFocus
    [Forms]![f_MainTripForm_Admin]![TripStartDate].SetFocus
    However, the focus is staying on the TripStartDate field in the...
    See more | Go to post

  • A final addition:

    The code to clear the filters is as follows:

    Code:
    Private Sub ClearFilters_Btn_Click()
    
    'Clear form filter fields
    
       AccoladeTarget_DD = Null
       AccoladeType_DD = Null
       Me.PersonName_DD = Null
       Me.PersonOffice_DD = Null
       Me.Year_DD = Null
       Me.City_DD = Null
       Me.ProvState_DD = Null
       Me.Region_DD = Null
       Me.Publisher_DD = Null
    ...
    See more | Go to post

    Leave a comment:


  • Thanks to you both! This is solved with a combination of both your suggestions :-)

    Here is the full code for the Function:

    Code:
    Function ReportFilters() As String
    
    'Generate the String that will filter the reports
    'First Field
       If IsNull(Me.AccoladeTarget_DD.Value) Then
           ReportFilters = "[AccoladeTarget] Like '*'"
       Else
           ReportFilters = "[AccoladeTarget]
    ...
    See more | Go to post

    Leave a comment:


  • I think it is evaluating correctly, but only in the first procedure. I get no debug result at all in the second procedure.

    In the first procedure, for only 2 selected criteria:

    Target = Firm
    Year = 2014

    Debug.Print strCriteria generates the following in the Immediate Window:

    Code:
    [Target] = 'Firm' 
      AND [Type] Like '*' 
      AND [PersonName] Like '*' 
      AND [Office] Like '*'
    ...
    See more | Go to post
    Last edited by zmbd; Sep 5 '12, 09:28 PM. Reason: (z) added code tags and steped the string

    Leave a comment:


  • Thanks for the quick reply.

    I tried changing to Public Sub ReportFilters() but I get a Run-time error '3219' Invalid Operation error on the second procedure.

    Sandra
    See more | Go to post

    Leave a comment:


  • Sandra Walsh
    started a topic Carry a String from one procedure to another

    Carry a String from one procedure to another

    Hello -

    I have a form called f_ReportsDashbo ard with several dropdowns that I use to generate a string of criteria values for reports.

    Using the code below, I can succesfully generate the strCriteria in a stand-alone procedure.

    Code:
    Private Sub ReportFilters()
    
    ' Generate the String that will filter the reports
    Dim strCriteria As String
    First Field
       If IsNull(Me.RecStatus_DD.Value)
    ...
    See more | Go to post

  • Sandra Walsh
    replied to Using a recordset instead of DLookup
    Thanks for the clue - I totally forgot about this simple solution.

    Since the values for the Office and Department field are read-only from the existing dataset, I just needed to display those values on the form. I can use a query that includes these fields for reporting purposes since reports do not require an updateable dataset.

    I set the row source of the PersonName_DD combo as follows:

    Code:
    SELECT q_People.Person_ID,
    ...
    See more | Go to post

    Leave a comment:


  • Sandra Walsh
    replied to Using a recordset instead of DLookup
    The reason I am trying to get away from using DLookup is that is slows the form down considerably as I have to use it for two fields. I am hoping the RecordSet method will speed things up.

    Here is the code for the forms OnOpen event:

    Code:
    Private Sub Form_Open(Cancel As Integer)
    
    Dim MyDatabase As DAO.Database
    Dim rstPeople As DAO.Recordset
    
    Set MyDatabase= CurrentDb
    Set rstPeople =
    ...
    See more | Go to post

    Leave a comment:


  • Sandra Walsh
    replied to Using a recordset instead of DLookup
    Thanks for moving the thread.

    How do I edit the title? If you can do it, it should read something like ...

    "How to reference fields in an existing RecordSet"

    Thanks again!...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...