Search results

  1. Kiwiman

    Dcount Type Mismatch

    Howzit Try If Me.txtCustomerID.Value = "" or isnull(Me.txtCustomerID) Then Me.txtCustomerID.Value = "T" & Format(Date, "yyyymmdd") & Format(Time(), "hhnnss") End If To stop the warning message you can either turn the warnings off then on or currentdb.execute strSQLAdd
  2. Kiwiman

    ComboBox Problems

    Howzit Try this in your Form_Current event procedure Private Sub Form_Current() Me.cboCountry.Requery Me.cboState.Requery Me.cboCounty.Requery Me.cboCity.Requery End Sub This will still leave blanks on the odd record but this is because of an incorrect city selections based on the state...
  3. Kiwiman

    ComboBox Problems

    Howzit Look at your bound column - this is what determines what is written to the table. Your bound column for the county is your 1st column (county ID) (which is hidden in your combobox as you have set the column width to 0) but the county id is stored in the table not the county name.
  4. Kiwiman

    Cascading Combos in Subform v9999

    Howzit What do you want it to show? As all your column widths are > 0 when you choose the second combo box it will show the value in the bound column. BTW - did you realise that your qry underlying the second combo box produces a cartesian join (every combination of both tables) asa you do...
  5. Kiwiman

    Dcount Type Mismatch

    Howzit You want it here If Len(Me.txtForename & vbNullString) = 0 Or Len(txtSurname & vbNullString) = 0 Then Cancel = True MsgBox "You have not entered a Forename or Surname" exit sub End If
  6. Kiwiman

    if greater than *.512

    Howzit This will work =IF((yourcell-INT(yourcell))>0.512,yourcell+0.512,yourcell)
  7. Kiwiman

    substitute value for Dlookup() if null is returned

    Howzit THis will also work I believe. This will, in this case give you 1/1/1900 where null FDate = Nz(DLookup("SubcallDate", "Stats Spec Customer First Date"),dateserial(1900,1,1))
  8. Kiwiman

    Dcount Type Mismatch

    Howzit No problem. Glad it is all working.
  9. Kiwiman

    Dcount Type Mismatch

    Howzit Also check that this works (I suspect it will not work) in this instance (notwithstanding something similar has worked elsewhere) - we checked the one but not the other Tot30 = DCount("SubcallID", "Stats Customer Subcalls", "CallDate>= (Date() - 30)") MsgBox Tot30
  10. Kiwiman

    Dcount Type Mismatch

    Howzit I have tested this against a table and query (set up to have your parameters \ fields) and the dcount works just fine. The only time I got your error was when I was running against a query where I had formatted the CallDate as part of the select syntax where I had to rename the calldate...
  11. Kiwiman

    A button to paste a time stamp in a field or two

    Howzit Try me.requery
  12. Kiwiman

    Grabbing windows user name

    Howzit I have used this in the past. There are other ways, but I do not have these at hand. A way to call it is dim strSendWho as string strSendWho = GetUserName_TSB Put this in a module Declare Function TSB_API_GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As...
  13. Kiwiman

    Visual Basic,NET - Not inserting correct date.

    Howzit Likewise for me. I have only converted a couple of macros and found no problem. I found using the wizard when adding controls quite useful when first starting out as you could then identify how the syntax is created and what it actually does. Good luck
  14. Kiwiman

    Visual Basic,NET - Not inserting correct date.

    Howzit Or this? The date will only give the date portion and no time content. FOrmatted to american date so SQL can handle it - not sure if strictly necessary but this is what I tend to do. "VALUES (""" & strFileAdd & """, #" & format(Now(),"mm/dd/yyyy") & "#, " & intTotalCount & ")" To...
  15. Kiwiman

    Dcount Type Mismatch

    Howzit Ok - but does Cid return anything? It's just that your post above doesn't show anything for that, unless it was a typo ContactID= AND . The dlookup syyntax looks fine how we have it. msgbox cid
  16. Kiwiman

    Change Query Parameters On The Fly

    Howzit Try making the user select the dates from the form (have a coupe of text boxes on your form to hold the dates) you are running the query from, and then link query parameters to the form. You can then check to see if the dates fit within your requirements Your code will look something...
  17. Kiwiman

    Dcount Type Mismatch

    Howzit What is CID? Your post shows ContactID= AND where i would have expected (eg) Contactid=1 AND Does this work on your current form? Total = DCount("SubcallID", "Stats Customer Subcalls", "ContactID=" & CID)
  18. Kiwiman

    Dcount Type Mismatch

    Howzit Quite right - subsequently amended :)
  19. Kiwiman

    Dcount Type Mismatch

    Howzit Ok try this then. You needed the & " AND... to join the two criteria together. Total = DCount("SubcallID", "Stats Customer Subcalls", "ContactID=" & CID & " And CallDate>= (Date() - 30)") Subsequent edit to remove extra "
  20. Kiwiman

    A button to paste a time stamp in a field or two

    Howzit No worries. Catch ya later
Back
Top Bottom