Search results

  1. D

    Returning two values from a single record ...I think ...

    I have a very simple database for tracking movies. One Table has Theater Information, which includes Name and City. In another related table I track attendance - when I choose a Theater name I'd like the City field to be populated, but I can't for the life of me see what I'm doing wrong ...
  2. D

    VBA to bypass the Switchboard

    I can manually stop the AutoExec macro from running by holding down the shift button - how do you do it by VBA? I'm opening the db from Excel, and I don't want the Switchboard to display ...
  3. D

    Passing a variable from Excel to fire an Access Query

    I'm running a VBA routine in Excel that loops through a lot of data. As part of the process, I'd like to pass a variable from Excel to an Access database that is open and have it run a query based on that value ... anyone ever done it? Is it feasible? It's not how I would do this project if it...
  4. D

    Opening the Immediate window with VBA

    OK - I can get the Code window to open when I run the program by using Application.VBE.MainWindow.Visible = True To be honest, it's not a lot of use as it sits there doing nothing ... Far better for me to have the "Immediate" window open ... How do I do that from within VBA ... I can then...
  5. D

    Brain needs a nudge ... Check for varaiable in a table

    Friday afternoon and I'm not thinking very well ... I have a process that reads a list of files sequentially and then processes them .... As each file is processed, its name (strfile) gets written to a Table (Vault.[Processed_file]) I want to verify if the file exists in the table prior to...
  6. D

    Copying one table to another less any that currently exist

    I'm in the process of migrating some Access Tables to SQL as we're approaching the size limitations of an Access table. I created a SQL table by using the Upscaling wizard and it worked fine, however, since I created it the original table has "grown"! With very large tables the Wizard is slow -...
  7. D

    Question Import Specs - location

    Can anyone point me to the location of Import Specs for text files? Can you edit them?
  8. D

    Counting unique records using SQL

    So - I am trying to count unique records in my table (Demographic_detail). It works perfectly when I use the following SELECT Count(*) AS N INTO tblTempC FROM (SELECT DISTINCT Account FROM Demographics_detail) AS T; However, I'd like to add a criteria to count unique where my field...
  9. D

    DoCmd.TransferText

    The following code works perfectly DoCmd.TransferText acImportFixed, strImpSpec, strTable, strPathFile, boolHasFieldNames If I replace the "acImportFixed" with a string function witht he same value, it fails with an Error 13 Type Mismatch DoCmd.TransferText strTextTransfer, strImpSpec...
  10. D

    Query Counting Well - Summing Badly!

    strSQL2 = "SELECT COUNT(" & strTable & ".[ID]) AS CountOfID, CCur((DSum('[Balance]','[" & strTable & "]'))) AS SumBal, " & strTable & ".[Processedfile] " & _ "INTO [tblTempC&B] " & _ "FROM " & strTable & " " & _ "WHERE...
  11. D

    QUery is returning text when it should be $$$

    I run a MakeTable Query on some data to COunt the number of records and Sum the Value of $$$ in a Currency field. The results produce a Number for the Count, but the SUM of the Balances is returned as text. To get the SUM I use the expression SumBal: DSum("[Balance]","[XAM_data]") Anyone...
  12. D

    Today's Poser ..

    I have some code that among other things processes text files. These text files contain individual records and lots of other "rubbish" (not really) that we don't need to track or save. Having processed the file and sanitized the records to reflect only the information we want to record, we write...
  13. D

    SQL Query is not working - nothing new ...

    Set prst = CurrentDb.OpenRecordset("SELECT Count ([AHC_data].[AccountNo]) AS CountOfAccountNo, DSum ([AHC_data].[Balance],AHC_data) AS TotalBal " & _ "FROM [AHC_data] " & _ "WHERE [AHC_data].[Processedfile] =...
  14. D

    Update ...Inner Join ... Set

    strSummarytovault = "UPDATE Vault " & _ "INNER JOIN File_Summary ON Vault.[Processed_File] = [File_Summary].[File] " & _ "SET [Vault].[Balance] = [File.Summary].[Total Value];" Comes out to this .... "UPDATE Vault INNER JOIN File_Summary ON Vault.[Processed_File] = [File_Summary].[File] SET...
  15. D

    Writing the result of a Query to a Table

    I use a query to sum the outstanding balances that are included in a particular file to a summary table (I call it my Vault) The original file may include dozens of accounts, but all I want to write to the Vault is the sum of the balances. The query is named "Sum of Account Balances" - the...
  16. D

    Writing to an empty field in a record that was imported

    Am busy importing text files and its working OK, save for my attempt to write the filename to each record - its a bit of an after-thought, I suppose :o The challenge I'm having is wrting to the field, only if it is empty. That prevents the code from overwrting every record with teh filename...
  17. D

    Text file import to table with File Date

    I'm able to import the contents of the text file into a table, thanks to the help of folks in this forum. What's the best way of tying the data from the text file to the filename and its date? As the files are relatively small in size and they later get scripted into another system, I think...
  18. D

    DoCmd.TransferTxt .....

    SOmrthing is awry with the code below - it cannot find the file to import from even though it appears in the locals window as a variable etc ...... :confused: Appreciate your insight and assistance folks! Sub txtfileimport() Dim strPathFile As String, strFile As String, strPath As String Dim...
  19. D

    Calling variables from a Table

    I am trying to modify some code that we use to move data files around our system, and we currently use Access for this purpose. It may not be the optimal way of doing it, but there's a great attachment to the software here, and I can't see it going away! ;) However, in order to make the code a...
  20. D

    Hello from SoCal

    Hi all! I'm in SoCal and excited to expand my knowledge of Access VBA with the assistance of all you generous types around here. Its a propos that this forum has its roots in the UK, as, many moons ago, I started off there, but through some quirk of employment and marriage ended up in Laguna...
Top Bottom