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 SkipVought 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. Sumitdev

    Stripping first 2 characters from a field

    Could try: UPDATE Table1 Set Field1 = iif(IsNumeric(Left(Field1, 2)), Mid(Field1, 3), Field1)
  2. Sumitdev

    Compact & Repair Database(access)

    Have you tried using DBEngine.CompactDatabase? You will need Microsoft DAO 3.6 Object Library selected as a reference.
  3. Sumitdev

    ERROR 3078: Jet Engine can't find input table or query

    You may need to refresh the JET cache using the JRO.JetEngine Object (Microsoft Jet and Replication Objects 2.6 Library) Dim pJE As New JRO.JetEngine pJE.RefreshCache cnn Set pJE = Nothing
  4. Sumitdev

    Week No in a query

    You could try the DateDiff function: SELECT X.Date, 'Week ' & ( DateDiff('ww', datevalue('02/01/06'), X.Date) + 1) AS WeekNo FROM X
  5. Sumitdev

    using IF within SQL?

    Not sure about the case as I have never used it before! But could adding an additional iif to check if Value is 0 work? iif(Value (GBP) = 0 AND Cost Of Sale > 0, -100, iif(Value (GBP) = 0 AND Cost Of Sale < 0, 0, iif(Value (GBP) = 0, 0...
  6. Sumitdev

    using IF within SQL?

    You could try using an iif statement: iif(Value (GBP) = 0 AND Cost Of Sale > 0, -100, iif(Value (GBP) = 0 AND Cost Of Sale < 0, 0, (Value (GBP) - Cost Of Sale)/Value (GBP)) * 100 ) ) AS Margin
  7. Sumitdev

    How to word a specific criteria in a query

    In Where clause len(Field) = 8 AND not isnumeric(mid(Field,1,2)) AND isnumeric(mid(Field,3))
  8. Sumitdev

    DateSerial problem

    Think you might have your > and < the wrong way round. Should it be: SELECT AssetCenterImport.[Remarks (Problem)], AssetCenterImport.[Notified On] FROM AssetCenterImport INNER JOIN T_InventoryBilling ON AssetCenterImport.SerialNo = T_InventoryBilling.IB_SerialNumber WHERE (((...
  9. Sumitdev

    Control LOSTFOCUS not triggered when closing form via 'X'

    Is there a reason the check is in the LostFocus event? Could you not set the flag in the Change event of the text box ?
  10. Sumitdev

    Table names of Access from DAO

    Public Sub PrintTableNames() Dim t As DAO.TableDef For Each t In dbCurrent.TableDefs debug.print t.Name Next t Set t = Nothing End Sub Where dbCurrent is your database.
  11. Sumitdev

    Search Between Dates

    Does using a >= <= rather than Between work? sqlInsurer = "SELECT * FROM Renewals_Extract WHERE PolicyEndDate >= #" & SearchD & "# AND PolicyEndDate <= #" & searchE & "#" or using the DateValue function sqlInsurer = "SELECT * FROM Renewals_Extract WHERE PolicyEndDate BETWEEN DateValue('" &...
  12. Sumitdev

    Search Between Dates

    Have you tried formatting it 'mm-dd-yyyy'? We have to convert our UK string dates to their US equivalents.
  13. Sumitdev

    rs.RecordCount always -1

    If you do a MoveLast it will populate the recordset and give you the number of records. You will need a check to make sure records exist first (not BOF or EOF).
  14. Sumitdev

    &quot;Option Button Control&quot; Pressing TAB

    You would need to put each one in a container i.e. a frame or use the cursor keys to move up and down them rather than tab. Not sure if you can cause them to tab between each other.
  15. Sumitdev

    listView problem

    Think the sub items start from 1. Does : ClassDesc = lstHist.ListItems(1).Text return what you need?
  16. Sumitdev

    passing Values between forms

    You could add a module and declare your class as a global variable or set it as Public in frmMain referencing it from frmNames as frmMain.Human. Both ways should mean you wouldn't need to use the HandTo procedure.
  17. Sumitdev

    Run-time error 383. 'Text' property is readonly

    Is it the .TextRTF or the .Text you are setting?
  18. Sumitdev

    ComboBoxData, change Capital to non-Capital

    You could use the LCase function Do Until rs.EOF Combo1.AddItem lcase(rs!TEST) rs.MoveNext Loop
  19. Sumitdev

    Flashing BackColor

    Add a timer control to your form and set its enabled property to False or it will always flash. You will need to set the timer interval too. In the Timer event of the control put your flash code: Private Sub Timer1_Timer() Static blnFlash As Boolean If blnFlash Then...
  20. Sumitdev

    2 OUTER JOINS

    Have you tried adding brackets around your first join select E.CTRL_DIRECT, MI.DESC as MI_DESC, FC.DESC as FC_DESC from ( table_E e left outer join table_MI MI on E.MOT_INC_MENU = MI.CODE ) left outer join table_FC FC on E.FREC_CTRL = FC.CODE where CUE = 'XXX'

Part and Inventory Search

Back
Top