Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. HandsOnAccess

    Looping Through a Continuous Form

    I assume you have placed the above code in the OK Button On Click Event, Does the event execute any other code prior to this loop, can you paste full code of the OK Button On Click events here Thanks
  2. HandsOnAccess

    Union query as recordsource for subform

    I created a union query and tested it as a single form record source as well as for subform record source, It did not show any error message. In your case there could be some complication in Union Query. Alternatively you can create another query as follows SELECT * INTO Temp FROM <<union...
  3. HandsOnAccess

    Form Updates Table when it shouldn't

    The main form is having the same record source as that of subform. Moreover your combobox control source is bound to actual field from the record source. Just make the control source of the combobox as unbound and try
  4. HandsOnAccess

    Totals problem on form footer

    I have simulated your scenario, It worked for me. Assuming You have trapped Divide by Zero Error Case-1 Please go to design mode and cross-check the control name you have used for ATI, It should be same as what you specified in AVG() function. Case-2 Alternatively, in Footer Average Control...
  5. HandsOnAccess

    Requery to refresh combo lookup

    event <<ComboBox>>.GotFocus() Code me.ActiveControl.Requery
  6. HandsOnAccess

    Totals problem on form footer

    You have to make use of Nz() function. Nz function converts a Null value and prevent it from propagating through an expression. In case there is no qty for a particular year then Nz function will return zero. Example x = Null y = 5 z = x + y msgbox z 'You will get "Invalid use of Null" z...
  7. HandsOnAccess

    Problem Closing a Form

    Do you have any other lines of code associated with this event or any other event related the said last control? If so, can you please paste those code related to last control along with the event.
  8. HandsOnAccess

    Using DLookup on a form, text box awaits enter key....why?

    You can place the cursor on any valid control field by using me.<<control name>>.SetFocus You can place this statement in AfterUpdate event
  9. HandsOnAccess

    Print a running form

    If you dont mind can you please tell what you have put in "PrintF" macro
  10. HandsOnAccess

    Print a running form

    Please paste the code here
  11. HandsOnAccess

    Print a running form

    Create a Print Macro and Place it as a last statement inside the Loop
  12. HandsOnAccess

    FormatNumber Function

    Public Function RemoveDecimal(ByVal Price As Double) As Long intPart = Mid(Price, 1, InStr(1, Str(Price), ".") - 2) decPart = Mid(Price, InStr(1, Str(Price), "."), 6) If InStr(Str(Price), ".") > 0 Then RemoveDecimal = intPart & (decPart * (10 ^ (6 - Len(decPart))))...
  13. HandsOnAccess

    FormatNumber Function

    There are easier ways to format zeros and decimals Give numerical examples of initial price format along with the final format that you wish to have Give example on How you want the below like to look in terms of number RemoveDecimal = Price & NewPrice
  14. HandsOnAccess

    auto populate fields accross forms

    Possible test cases would be: The field `[accepted services date]` must be present in the `additional Victim` table as spelt in the code. A Textbox forms!client!acceptedservicesdate must be present in the `client` form as spelt in the code. The data type of `victim` field has to be integer...
  15. HandsOnAccess

    Looping Through a Continuous Form

    In your code paste the following code above the line Do While Me.NewRecord = False DoCmd.RunCommand acCmdRecordsGoToFirst ie., DoCmd.RunCommand acCmdRecordsGoToFirst Do While Me.NewRecord = False MsgBox Me.SampleID If Me.chkResultsReceived Then If strReturnedList = "" Then...
  16. HandsOnAccess

    Combo box data to open query

    You can write a code for Afterupdate Event of the combo box as shown below to open another form... Private Sub Combo0_AfterUpdate() DoCmd.OpenForm "Company", , , "[Company ID] = " & Me.ActiveControl.Column(0) End Sub
  17. HandsOnAccess

    Finding time differences in access

    You can use "n" to calculate time difference in minutes when using DateDiff function. Example is shown below Public Function calculate_time_difference() starttime = #10:00:00 AM# endtime = #10:35:00 AM# MsgBox starttime & Chr(13) & endtime & Chr(13) & DateDiff("n", starttime...
  18. HandsOnAccess

    Save rownumber of continuous subform?

    Furthermore, the OnCurrent Event needs to placed and triggered from the subform and not from the main form.
  19. HandsOnAccess

    Save rownumber of continuous subform?

    Could be because the onCurrent event is refering to the main form, instead of subform. Make sure the onCurrent event is refering the subform field value.
  20. HandsOnAccess

    Form &quot;Order By&quot; inhibits &quot;Duplicate Record&quot; function

    If possible please paste the function button code and the underlying query

Part and Inventory Search

Back
Top