Search results

  1. J

    DAO Database Object

    Hi Everybody, I've just progressed onto the DAO chapter of my VBA text and am already confused by what is supposed to be one of the simplest aspects of the Database object, that being counting the number of databases open in a workspace. The text says " Normally, we will have only one database...
  2. J

    Inconsistencies calling a function from within a sub or from the immediate window.

    I have encountered an apparent inconsistency in the way VBA handles calls to functions from within a subroutine, as well as calls to a function from the Immediate window. In both cases how VBA responded seemed to be dependent on whether there was one or whether there was more than one argument...
  3. J

    Trouble understanding the IsMissing Dunction

    Hi Folks, I'm working through an old manual that provides an introduction to VBA programming in Access and I'm stumped at their use of the IsMissing funtion. The code they provide is thus:- Function MakeIceCream (Optional CocoaToBeAdded As Variant) As String If IsMissing(CocoaToBeAdded) Then...
  4. J

    Storing Queries in VBA

    Hi All, This isn't an "I've got a problem" post but more one where I am after some general advice. I recently created (with the help of several helpful members of this forum!) a Sub Procedure in VBA to enable me to automate the Import of some data. The procedure contained a few docmd's and...
  5. J

    Issue with line continuation when running SQL in VBA

    Hi All, If a run the following SQL string from within VBA and the string is all on one line, it works fine:- SQL = "UPDATE tblContactImport INNER JOIN Customers ON tblContactImport.cuco_Company = Customers.cu_ID SET tblContactImport.cuco_NewPhone = Mid(Customers.cu_PhoneNumber,1,5)+'...
  6. J

    Trying to include Date function in new table name in SELECT INTO query

    Hi y'all I'm trying to use a SQL SELECT INTO statement to back up the table tblContactImport into a new table with the same name albeit with today's date stuck on the end :- for example if I ran the query to back up tblContactImport today, then I would like the new table to be called...
  7. J

    RunSQL Macro Command

    Hi All, I currently have a macro, that using the OpenQuery macro action, runs a number of update queries. However, as my database expands I do not want endless queries clogging up the navigation pane, so after finding out about the RunSQL macro command, I wish to copy the SQL statement for each...
  8. J

    Stripping spaces

    Hi All, I have a table - tblCustomers that contains the text field c_PhoneNumber that surprise surprise holds phone numbers. The trouble is that many of the records contain non-numeric characters such as hyphens and brackets as well as spaces. I would like to strip all of these out with an SQL...
  9. J

    Pop Up comments field

    Hi All I have a textbox - Forms![FrmPGFinal]![txtComments] that is bound to [tblPGFinal]![Comments], which has a Memo data type. I have an unbound pop up form - Forms![frmPopUpComments] with a single text field – [txtInsertComment]. There is also a command button – cmdOK. When I open the...
Top Bottom