Search results

  1. E

    if else statement

    New Total:iif([TotalQty]=[OpenQty],[OpenQty],iif([TotalQty]<[OpenQty],[TotalQty],[OpenQty]))
  2. E

    NZ function not recognised

    I am running Access 2007 opening a 2003 database. The Nz function is not working in a normal select query. In fact Access does not recognise it as it stays in lower case. Am I missing a reference or is there some other setting?
  3. E

    Help in ms access for query result

    Correct, on the On_Click event Copy the code below the Sub statement and above the End Sub and paste it in. What is does is ask for your form name. If it finds it in your table ("Your_Table_Name"), it opens the form stored as a variable in MyForm. Otherwise it opens the Data entry form.
  4. E

    Reusable code for Access?

    Is there a way to make reusable VBA/VB code for different Access applications, similar to the way references work ? I have tried writing Dll's using Express 2010 with no luck.
  5. E

    Help in ms access for query result

    Try this Sub FindForm() On Error GoTo ErrHandle Dim db As Database Dim rst As Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Your_Table_Name", dbOpenSnapshot) MyForm = InputBox("Enter search value", "SEARCH VALUE") strFind = "[Form_Name] = '" & MyForm & "'" If rst.RecordCount <> 0 Then...
  6. E

    Using variable to reference table field for updating

    My mistake, typing error, but had a data conversion error throwing me off track. (Field variable was a date, so I had to force it to as string). Once that was fixed, all works fine
  7. E

    Using variable to reference table field for updating

    Thanks, but sorry, no joy when trying to update the field. This works rst!MESSAGE = "Hello" but this does not dim strField as string strField = "MESSAGE" rst!Fields(strField) = "Hello" I get error 3265, item not found in this collection.
  8. E

    Using variable to reference table field for updating

    I have a variable that must determine what field must be populated in a table. Is this possible? Sub Get_Variable_Field_Name() dim db as database dim rst as recordset set db = Currentdb set rst = OpenRecordset("MyRecordSet") VarFieldName = "Valid table field name goes here"...
  9. E

    Batch file to run Access not working

    I have a batch file that used to start Access successfully via the task scheduler. But it suddenly stopped working. I can still open Access manually and it compacts on close as per its settings. When I try to compact it manually I get the message it is opened by user Admin on my machine. Nothing...
  10. E

    Copying or Moving a Video (or any other kind) File from One Folder to Another

    Here is code to copy files. Maybe it will help? Sub Copy Dim myObject as Object Set myObject = CreateObject("Scripting.FileSystemObject") Source = "SourcePathandFileHere" Dest = "DestPathandFileHere" myObject.CopyFile Source, Dest Set myObject = Nothing End Sub
  11. E

    Passing an Object (sounds funny dunt it?)

    As far as I know you cannot pass a control using the text name. You can pass it as a control. Short example. Private Sub Locktxt0() LockControl Forms!Form1!txt0 End Sub Public Sub LockControl(ctl As TextBox) ctl.Locked = True End Sub
  12. E

    else without if error

    May be silly, but I think your syntax is wrong. Try this: If cmb_Greeting1 = "YES" Then rs![Points] = 5 Else rs![Points] = 0 End If
  13. E

    ORA-01013 error.

    Thanks, it was confusing as the pass-thru query worked, but not the make-table query. After further investigation it appears the schema rights are not explicitly defined in the oracle database to the user running the select statement.. Must just get the Oracle DBA to resolve.:)
  14. E

    operation must use an updatable query

    Change qrySelectMaxDate to a make-table and run it. Call the new table tbl_SelectMaxDate Then change your original query to UPDATE tblMatrix INNER JOIN tbl_SelectMaxDate ON tblAll.SoldTo = tbl_SelectMaxDate.SoldTo SET tblMatrix.LastInvoicedDate = [tbl_SelectMaxDate]![MaxOfInvoiceDate]; Now it...
  15. E

    operation must use an updatable query

    This occurs when there is a many to one relationship. The best way to resolve is is to use a query to generate the update data table, then use the update data table to update the original table.
  16. E

    ORA-01013 error.

    When I run a pass-thru query, the data is returned, however if a make-table query is run on the pass-thru, the ORA error is returned. The pass-thru query's time out is set to 0. I don't think this is an oracle error because the pass-thru query works. Any ideas?
  17. E

    How to set field properties from VBA

    Try this You have to create the field before modifying it. With others field you normally can create with the correct formatting, but Access doesn't handle decimal too well. Hope this helps.
  18. E

    how to stop an excel process after opening in it access 2003

    I had a similar issue. If Excel opens an Excel child process, Access is not aware of it, and you do not have the ability to reference it in Access and close it down. Only the Excel app that was explicitly referenced in Access can be closed down.
  19. E

    Find files in web folder using vbScript

    Thanks, it did not work using vbScript, but by using the code 'as is' in HTML it worked, security threat or not. Thanks for the reply
  20. E

    Find files in web folder using vbScript

    How do I list all files in a web folder when the page loads? I am trying the following code, but I cannot determine the path (strPath) of the webpage. <head> <script language = "vbscript"> public Sub RunScript() Dim objFSO, objFldr Set objFSO =...
Back
Top Bottom