Search results

  1. A

    Using a query parameter as a field in a report

    Setting the Control Source as you did should work. You will get the two prompts for the dates and they should appear on the report. I often use this in my Report Titles by creating a text box with the control source set to the title text concatenated with the parameters. Example: ="Work done...
  2. A

    Easy Question - Calculate Days in Month

    The following functions are from one of Microsoft's downloadable sample databases, search on microsoft.com for neatcd97.mdb Function DaysInMonth(D As Variant) As Variant ' ' Returns the number of days in a month. ' Requires a date argument, since February can change if it's a leap year ' If...
  3. A

    Truncate question...

    The Left should return a result for all strings regardless of the length of the string, if the string is longer than 14 then it returns the first 14 characters else it returns all characters of the string. This happens regardless of version of Access.
  4. A

    Truncate question...

    You need to put [ ] around your field name. Thus you should have Left([ALPHA],14) This will include the spaces, if you want to remove them then use Trim(Left([ALPHA],14))
  5. A

    Limit Query returns

    The following should work Not "PA" and not "OH" and not "KY" .....
  6. A

    Truncate question...

    Try the following: StartText:trim(left([YourField],14))
  7. A

    Version Control in Access??

    I have been given responsibility for introducing a version control system for all the Access applications we have (97 and 2000) and was wondering if anyone had any particular product they use that they would recommend. I have searched on the net and found a few possibles but am interested in...
  8. A

    Can this be done...?

    Set the following as the control cource of the field in the details section of your report. To get one overall line use ="This occured at the " & IIf([aa]="branch","X","_") & " Branch " & IIf([aa]="Division","X","_") & " Division " & IIf([aa]="Both","X","_") & " Both" Example This occured at...
  9. A

    How do you Populate a field o a form based on a field in another form ?

    If you've got winzip then zip the database first and then attach the zipped file.
  10. A

    Field Formating: Query Results

    Within the query enter the following as a field Format([YourNumberField]*10000,"+000000000000000000")
  11. A

    Beginning & Enddates not dis correctly

    So long as you build your report on the query then the following can be entered as the Control Source for a field on the Report to give the desired title. ="Reports for Jobs Invoiced between " & Format([BeginningMonth],"mmm yyyy") & "and " & Format([EndingMonth],"mmm yyyy")
  12. A

    How can I get "Full Computer Name"

    Function GetUserName() As String ' Returns the network login name Dim lngLen As Long, lngRet As Long Dim strUserName As String strUserName = String$(254, 0) lngLen = 255 lngRet = apiGetUserName(strUserName, lngLen) If lngRet Then GetUserName = Left$(strUserName, lngLen - 1)...
  13. A

    How can I get "Full Computer Name"

    Sorry had left off the declaration code for the USER_INFO_2 data type. Public Type USER_INFO_2 usri2_name As Long usri2_password As Long ' Null, only settable usri2_password_age As Long usri2_priv As Long usri2_home_dir As Long usri2_comment As Long...
  14. A

    How can I get "Full Computer Name"

    I'm running Windows 2000 and A97 and the code will not work as is for me either. In stepping through the code it returns false for the NetUserGetInfo. Part of the problem seems to be that it 'bServername' is using the current computer name rather than the server name. I changed the code to...
  15. A

    pulling dates between dates

    Check the following post: http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=32050
  16. A

    How can I get "Full Computer Name"

    Remove the .text from the code in the Load event, try this instead. ' Me.Text1.SetFocus 'ghudson added Text1 = rgbGetUserName() ' Me.Text2.SetFocus 'ghudson added Text2 = rgbGetComputerName()
  17. A

    Change week number

    I don't know of any easy way other than to set up a table to correlate the actual calendar week to the week you want. WeekTable CalYear CalWeek ReqYear ReqWeek so you'd have something like 2002;34;2002;1 2002;35;2002;2 Then when you want to call your required week number use...
  18. A

    Beginning & Enddates not dis correctly

    The Format should really have put the year first for the query to work properly so it should read, I had forgotten the cardinal rule of always putting the year first to ensure the comparison works correctly. Format([JobDate],"yyyymm") and your criteria can be set to Between...
  19. A

    converting numbers to percentage

    Use the following expression in the query ([soldprice]-[costprice])/[costprice] Then right click on that column and select properties. Then set the Format to Percent. The field will now display as a percentage.
  20. A

    Beginning & Enddates not dis correctly

    You should put your criteria under another version of your date which you should format as "mmm yyyy" So your new field will contain the expression, you can set this invisible, i.e. untick 'Show' Format([JobDate],"mmm yyyy") and your criteria can be set to Between Format([BeginningMonth],"mmm...
Back
Top Bottom