Search results

  1. P

    #NAME? Error on form

    I assume "RH_TOTAL_CREDIT1" is the control name where you want to display the total, you shouldn't include it in the control source. =([RH_QTY_CREDIT1]*[Forms]![Stock_Form1]![STK_BASEPRICE])
  2. P

    Tracking SQL error in VBA

    Do you ask for a error when running your SQL? CurrentDb.Execute (strSql), dbFailOnError If you don't there wil be no warning, errorhandler or not.
  3. P

    Trying to program a dynamic search box

    I'm guessing, you don't have "option explicit" on top of your code (near "option compare database") txtSearch is a control on your form, but without telling VBA that, it's treatened as a variable you have to use "me.txtSearch" to use the control value. If "Option Explicit" is used the compiler...
  4. P

    Help in this SQL Statement

    Why store a calculated value? To display the time in the required format simply use a unbound field on your form/report with as source: dateadd("s", [YourControlnameHere] ,0)
  5. P

    Too few parameters, expected 1 Error

    Because you're running a SQL string in VBA functions will not be evaluated by referencing to a control (Me.Calendar9). The control name is a string so DateAdd wil not function, try: strSQL = "UPDATE tblAppealCases SET tblAppealCases.[ModRequestSMEAdjudicationDeadline] = #" &...
  6. P

    Help! Open form Where Condition

    Unless Address is a nummeric field your filter will not return records. Address normally is text so your stLinkCriteria should look like: stLinkCriteria = "[Address]= '" & [Address] & "'"
  7. P

    Where condition 2 conditions

    By using AND/OR you can narrow down your filter, for your situation something like: ="[AccountName]= '" & [AccountName] & "' AND [Brand] = " & "812" 'if it's a fixed nummeric value ="[AccountName]= '" & [AccountName] & "' AND [Brand] = '" & [Brand] & "'"'if it's a text value from a field
  8. P

    Shell command problem

    Because of the spaces you should place the command & filename between quotes and not the complete shell command: Shell (chr(34) & "c:\program files\internet explorer\iexplore.exe" chr(34) & " " & chr(34) & fname & chr(34))
  9. P

    Is my VBA Corrupting my databases?

    Are multiple users using the front-end? The whole purpose of a front-end is that it should be on the local computer of every user to avoid corruption. As a bonus it makes easier to do the development.
  10. P

    Can't Create MDE

    As far as I know it's not possible to create a mde in Access for a previous version of Access.
  11. P

    Contiuous Form Next Record Selector Problem

    By doing a requery after going to a new record it moves to the first record, the requery is not required. I agree with gemma-the-husky that it's an unusual way to retrieve data from another db. An append query would be easier. Some other notes made in your code below. rs.MoveFirst 'on an...
  12. P

    Public variable in combo SQL

    Did you try the sample code? "GetplngID()" should be without quotes in the critera. How do you plan to update your variable plngID, if it's based on a form you can simply put a reference to the control on the form as a critera in the query.
  13. P

    Issue with DateDiff

    If it's a date/time field in the table it's stored as a number where 1 equals 24 hours or a day. The way it's displayed depends on your regional setting or (if defined) the format defined in the table.
  14. P

    Public variable in combo SQL

    Make a public function to return te value of plngID and replace the 2 in your query by a call to your function. Function GetplngID() as integer GetplngID = NZ(plngID, 2) 'If not set choose a fixed value or allow null by removing the NZ End Function In your query replace 2 by "GetplngID()"
  15. P

    Run Time Error 3131(NEWBIE NEEDS ASSISTANCE)

    As this is an action query "DoCmd.OpenQuery" can be replaced by "CurrentDB.Execute" and you don't need to disable / enable warnings. This way you don't have the risk that the warnings stay off. I'm not clairvoyant I can't tell you if I'm able to help with your loopint problem (or have the...
  16. P

    Coding Error

    First, please use code tags if you're posting code so identing is preserved (makes it easier to read). The error on "eh.TryToCloseObject" is expected, there's no "eh" object in your code and TryToCloseObject is not a built in option. Several things wrong or could be done better in your code, I...
  17. P

    Run Time Error 3131(NEWBIE NEEDS ASSISTANCE)

    From what I can make of your SQL is that You have TableMakeQuery, it errors because you have an extra FROM. It should be something like: strSQL = "SELECT FirmNumber, NumberofAccounts, EmployeeID, ErrorCodeDescription, ErrorCodesandCorrections , Agreements, TypeofCommunication, Time, OpenedDate "...
  18. P

    DBEngine.RegisterDatabase Not Configuring Properly

    If you need the registry values, why not test if the values exist and if not there create them from VBA. A sample can be found here.
  19. P

    Email code creates an extra blank email

    Not sure if it's the cause but why do you use "With objOutlookMsg" and then "objOutlookMsg.To" if ".To" is enough.
  20. P

    Possible to copy/paste dirctory structure?

    I missed an "&" before SourcePath :D, you need to tell VBA what you want to do with two strings.
Back
Top Bottom