Search results

  1. J

    Creating a general date from a short date and my own time stamp?

    Since Date/Time datatype is really double numbers just add them together. 9 AM is 0.375 eg: [DateField] + 0.375 JR
  2. J

    Problem with DLookup - Can anyone see why this isnt working?

    Well since your variable sUserID is defined as String you must enclose it in quotes. sGroupID= Dlookup("DepGroupID", "UserNames_tbl", "[sUser]= '" & sUserID & "'") JR
  3. J

    Enable Disable field if value exist in it

    Since you do a boolean comparison you can do it in one line ex: Me.Text360.Locked = Not Isnull(Me.Text360) You use the Not operator to reverse IsNull() test from True to False and False to True JR
  4. J

    Convert 20020322 number into Date Format

    lookup DateSerial(Year, Month,Day) function x=20020322 DateSerial(Left(x,4), Mid(x,5,2),Right(x,2)) JR
  5. J

    Query for Moving Average

    To open a recordset on your Data table: Set rs = db.OpenRecordset("Select DAX, DAXav From Data Order By [Date]", dbOpenDynaset) Note that the DATE field is enclosed in square brackets because "Date" is a SQL reserved word as a sidenote what you are attempting is storing a calculated value...
  6. J

    Opening Query after combobox selection

    Nothing wrong with your code it works as intended, have you enabled codes/macros? http://www.btabdevelopment.com/ts/default.aspx?PageId=13 JR
  7. J

    convert number value to word value

    Somthing along the lines of this function: http://access.mvps.org/access/modules/mdl0001.htm JR
  8. J

    Finding all occurances of a certain type GUI control - grep for Access?

    You could use the QueryDef object to list alle queries, combo/listboxes, forms/reports that use a SQL-sting in its recordsource. Function AllQueries() Dim qdf As DAO.QueryDef For Each qdf In CurrentDb.QueryDefs With qdf Debug.Print .Name 'Debug.Print .SQL End With Next...
  9. J

    Linking Excel to Access DB

    the immediatewindow should be at the buttom of your screen when you are in the VBA editor. If not the go to menu: View -> Immediate Window JR
  10. J

    How to extract a file name from a path string?

    Mid([Field],InstrRev([Field],"\")+1) JR
  11. J

    text criteria in table gives data type mismatch

    If the field ListPr in the table InvestorClient is the "textNumber" then I would think that this should work: ((A5.LP)> CCur([InvestorClient]![ListPr]))); JR
  12. J

    text criteria in table gives data type mismatch

    Look in access help for Type Conversion Functions, in your case CCur() or CLng() JR
  13. J

    Converting text date to number date

    Put the expression in the Controlsource of the control and make it a calculated control. =Dateserial(left([Field],4),mid([Field],6,2),mid([Field],9,2)) where [Field] is the name of your tablefield in the forms recordsource. JR
  14. J

    Calculations not displaying

    Ahh those Nulls. Glad you got it working JR
  15. J

    Calculations not displaying

    I think you have a structural problem with the table that your subform is based on, does the table look something like this: ItemID StockIn StockOut ..other fields If so then thats not how it suppose be, any transaction table should have In/Out in one filed with StockOut be a negative number...
  16. J

    Keep track of each transaction?

    Look into the Nz() function Nz([Control],Alternate Value if null) JR
  17. J

    Calculations not displaying

    =[StockIn]-[StockOut] In other word lose the Sum() JR :)
  18. J

    Keep track of each transaction?

    If you struggle with delimiters or data containg quotes then you can a create on-the-fly parameter query: Dim qdf As DAO.QueryDef Set qdf = CurrentDb.CreateQueryDef("", "Insert Into History([Item #],[Part #],[Item Description],Stock) " & _ "Values...
  19. J

    SQL RecordSource With Control Reference

    I think one problem here is that the subform opens BEFORE the main form so your refrence to the main form would be invalid. You don't need the .Form part when refrencing your main form Perhaps moving the code to your mainform's Current-event might get you there. JR
  20. J

    Converting text date to number date

    DateValue("2011-01-12 11:00") Should remove the timevalue JR
Back
Top Bottom