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 strongm 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. JoeCrystal

    Formula for Determining the Date of Next Monday

    DateAdd("d",7 - Weekday (CurrentDate,crTuesday ), CurrentDate)
  2. JoeCrystal

    Difference Between Two Times...

    TimeValue (Picture("080000","XX:XX:XX"))
  3. JoeCrystal

    Number to Date

    In Basic syntax: Dim D As Number ' D = 10031985.00 Formula = Mid(ToText(D,"00000000"),1,2) + "/" + Mid(ToText(D,"00000000"),3,2) + "/" + Mid(ToText(D,"00000000"),5,4) This works for either 9 or 10 digit dates
  4. JoeCrystal

    Convert Periods to Dates

    Try: ToText({ACCOUNT_BALANCE.ACCT_PERIOD},0) & '/1/' & ToText({ACCOUNT_BALANCE.ACCT_YEAR},0,'')
  5. JoeCrystal

    VB6 Object References for Crystal Reports 9

    You were using the OCX in the earlier version. I believe Crystal dropped support for the OCX in version 9. You will have to convert your code to use RDC or CRPE if that is the case.
  6. JoeCrystal

    How can I create a virtual field???

    You probably want to change your formula to: If IsNull(reg.dx_code) Then main.dx_code Else ref.dx_code
  7. JoeCrystal

    Counting Fridays in date range (for loop)

    numberVar n; numberVar i; n:= DateDiff("d",{?sDate},{?eDate})\7; for i:= 0 to (DateDiff("d",{?sDate},{?eDate}) Mod 7) do ( If DayOfWeek (DateAdd("d",-i,{?eDate})) = 6 Then ( n:= n + 1; exit for); ); n
  8. JoeCrystal

    DATE CONVERSION FROM STRING OF NUMBERS

    Dim strDate As String strDate = "20030307" Formula = DateValue(ToNumber(Mid(strDate,1,4)),ToNumber(Mid(strDate,5,2)),ToNumber(Mid(strDate,7,2)))
  9. JoeCrystal

    Search String and return desired text

    Try something like this: Dim ip As string ip = "12.456.78.000" Formula = Left(ip,Instr(ip,Split(ip,".")(4)) -2) Depending on your data you might need to add some data check to avoid errors.
  10. JoeCrystal

    Rounding to nearest 0.05

    You could use a formula something like: Dim x as Number x = 1.56 If Remainder (x, 0.05) < 0.025 Then Formula = x - Remainder (x, 0.05) Else Formula = x + (0.05 - Remainder (x, 0.05)) End If If you can have negative number than you will have to modify this slightly to work.
  11. JoeCrystal

    VB6 &amp; craxdrt.dll: verify report database in code

    I should of mentioned that you should logon to database before you verify. I recall that I had the same problem until I remember that if you open up a report and verify it will want you to log on first. Where I used it was an application using the Lotus Notes native driver and it work as soon...
  12. JoeCrystal

    VB6 &amp; craxdrt.dll: verify report database in code

    You can use: rpt.database.verify Where; rpt is Crystal Report Object
  13. JoeCrystal

    can i use crystal to write a report from text

    I do not think you can write a report directly from a Word Doc. But is you can save it as a text file then you can report off the converted text file using ODBC and setting up a DSN using the text driver.
  14. JoeCrystal

    Subreports within subreports? is this possible?

    You might try reorganizing your report as follows: Property #N Details A: Contact info (SubReport Linked using Property ID to limited contact info only for Property #N) Details B: Email (SubReport Linked using Property ID to limited EMail info only for Property #N) Details C: Phone No...
  15. JoeCrystal

    Using Crystal Arrays/Split Function

    if ({CUSTOMER_NAME} = &quot;funkyCustomer&quot;) then split({SERVICE_NAME}, &quot; &quot;)[1] else {SERVICE_NAME} Note: This will not work if ({SERVICE_NAME} is = blank. If this can happen you will have to add a check for this condition.
  16. JoeCrystal

    How to avoid duplicate lines withone-to-many table link

    You can do via formula using the Next/Previous function. It is also possible to group on formula.
  17. JoeCrystal

    How to put the CRViewer Control on a form?

    Even though you can add the Viewer ActiveX control to an Access form I do not think it is compatible. You will notice that all the properties and methods are not exposed when you add the control to the Access form.
  18. JoeCrystal

    Finding the average of elapsed time

    I would write a formula that captures the elapsed time in seconds using the function DateDiff: DateDiff (&quot;s&quot;,{Elapsed.Start} , {Elapsed.End}) Then to calculate and display the average write a formula as such: numberVar Hrs; numberVar Minutes; numberVar Seconds; Hrs:= Average ({@ET})...
  19. JoeCrystal

    How to avoid duplicate lines withone-to-many table link

    Group on customer, suppress detail, and display customer & contact info in the group footer or header.
  20. JoeCrystal

    (Padding) Displaying a number with a fixed number of digits

    If your record number field is numeric: ToText({RecordNumberField},&quot;00000&quot;) If your record number field is a string: ToText(ToNumber({RecordNumberField}),&quot;00000&quot;)

Part and Inventory Search

Back
Top