Search results

  1. Y

    allowAdditions problem

    Thanks very much for your help! Actually, I have this code in Form_load() Me.DTP.Value=Now() When I run to this line of code, the error shows.
  2. Y

    allowAdditions problem

    Yes, If user clicks a button, I set its value to the former month: Me.DTP.Value=DateAdd("m", -1, Me.DTP)
  3. Y

    allowAdditions problem

    HI, Thanks so much for your reply!! There is no Control Source for the DatetimePicker, I read date time from it. Thanks again.
  4. Y

    Run-time error 94, invalid use of null

    Thanks very much, it works great! Any suggestion about allowAdditions?
  5. Y

    Run-time error 94, invalid use of null

    Hi, Got same error but in differenct situation, there is nothing in txt1( it holds decimal value), but it runs to Else, then got the same error,thank for reply. If Me.txt1.Value = "" Then ' Also trie =null, same error var = 0 Else var = Me.txt1 End If
  6. Y

    allowAdditions problem

    Hi, This might be a dummy question: I have a continuous form with a DatetimePicker, textboxes,which displays one month's data, but always got one more empty row at the end of each month, after set AllowAdditions to No for the form, got an error: Run-time error 2763, DTPicker returned the...
  7. Y

    Date time problem

    this works great!!
  8. Y

    Date time problem

    Sorry, but how to do that use variables? I mean, DateDiff("h",#dtFirst#, #dtSec#), got compile error: expected: expression.
  9. Y

    Date time problem

    Yes, YOU are right, need #, and it works! Many thanks!
  10. Y

    Date time problem

    Hi, I have a dtFirst is 2/28/2010 8:00:00 AM, dtSec 3/1/2010, and need to do : 3/1/2010 12:00:00 AM -2/28/2010 8:00:00 AM. Tried 1. CDate(dtSec & " " & " 12:00:00 AM"), but still get 3/1/2010 2.DateDiff("h",2/28/2010 8:00:00 AM, 3/1/2010 12:00:00 AM), got an error: Comple error: Expected...
  11. Y

    Run-time error 94, invalid use of null

    HI, After I set AllowAdditions to No, got an error: Run-time error 2763, DTPicker returned the error: property is read-only. And no data displayed at all on the form. Many thanks!!
  12. Y

    Run-time error 94, invalid use of null

    Hi, thanks for all your reply. I check the query and found no data returned, after add one more criteria, got the data. Thanks so much! Another problem: I have a continuous form which displays one month's data, but always got one more empty row for every month, how to delete this additional...
  13. Y

    Run-time error 94, invalid use of null

    HI, I need read data from a table, my code : strSQL = "SELECT time,Amount," _ & " Where sampleDateTime = " & "#" & lastDayOfPreviousMonth & "# ;" Set rs = CurrentDb().OpenRecordset(strSQL) If rs.EOF Then 'MsgBox .Show(no data) Else mTime = rs.Fields("time")...
  14. Y

    insert query error: missing semicolon(;)

    Hi, Many thanks! It works great! Have a nice afternoon!
  15. Y

    insert query error: missing semicolon(;)

    Thanks so much for your great help! It almost works, I got better error using your command. There is one more problem: I need to insert a field with text value from form, the query is: strSQL = "INSERT INTO tblTest(totalNum, totalWeight,units)" _ & " VALUES" & totalGal & ", " & totalW& "," &...
  16. Y

    insert query error: missing semicolon(;)

    Thanks. I DO want a record written into database, but where is the problem?
  17. Y

    insert query error: missing semicolon(;)

    I got: INSERT INTO tblTest( totalNum, totalWeight) VALUES(120,88) ; No error! and no data write into the database. Thanks!!
  18. Y

    insert query error: missing semicolon(;)

    Hi, Thanks so much for you reply. I delete the where clause, but the query did not work, the record did not go into the database. That's reasonable, because the qry does not know where to insert. I need to insert based on the ID. Please help!
  19. Y

    insert query error: missing semicolon(;)

    Hi, I have a query in VBA access 2003 strSQL = "INSERT INTO tblTest(totalNum, totalWeight)" _ & " VALUES" & totalGal & ", " & "" & totalW& ")" _ & " WHERE ID = " & Me.ID & " ;" CurrentDb().Execute strSQL The qry is in immediate window: INSERT INTO tblTest(...
  20. Y

    subform with combo selection

    Hi,dk, Thanks so much for you reply. the subform is a datasheet format, I know the continous subform can do that, but how to do that in datasheet format?
Back
Top Bottom