Search results

  1. M

    Excel VBA filter

    Hi Guys, I've been playing around with this all day and can't seem to get it to work. I am filtering a column of numbers for anything greater than the value of a variable. The code works when I write in the number itself, but can't write a version that uses the variable (strDate) I'm...
  2. M

    VBA highlighting cells and merging

    Hi Guys, I need some code that will merge a cell and the one next to it. Problem is this cell could be anywhere and uses code to find its location so it will never be in a difinitive location. Any suggestions? Cheers, T.
  3. M

    Problem with Auto Filtering Dates

    Hi Guys, I am trying to use the custom option on the autofilter tool to filter a column of dates. I need it to filter every entry that equals or is more recent than a date that I put in. The date format is dd.mm.yyyy. The filter doenst seem to filter them correctly or filters them all out...
  4. M

    Exporting a query to a text file

    Hi Guys, I'm trying to export the results of a query to a text file using the code below: DoCmd.TransferText acExportDelim, "DE16 Import Specification", "Query1", "c:\winnt\PROFILES\mead_t\Desktop\testing.txt" But when I run it I get the error: The Microsoft Jet database engine could not...
  5. M

    Including headings in export .txt file

    Hi guys, Simple question, can't figure this out. I want to include headings when exporting a query to a txt file but I can't find an option to do this. I use a saved export specification to do this. Any suggestions? T.
  6. M

    Creating Export Specification

    Hi Guys, I'm trying to create an export specification by doing File - Export... - choosing text file - Export All. At which point the Export Specification window should pop up, but it doesn't. It just goes straight ahead and exports the table data to a text file, but in the wrong format...
  7. M

    Can I add more than 16 fields to a query

    Hi Guys, I need to create a query that has more than 16 fields, but I cant find an option to insert additional fields. Can you have more than 16 fields, and if so, how? Cheers, T
  8. M

    hiding fields when displaying tables

    Hi Guys, I think this should be another simple one, I need to display a table but hide a few of the fields. Im using the code below to open the table, but how would I hide certain fields? DoCmd.OpenTable "Data Conversion", acViewNormal, acReadOnly Cheers, T.
  9. M

    access function runs slower afer being run multiple times

    Hi Guys, I have a database that works on quite an involved function. Ive found that when I run this function over and over again it slows down conciderably. The only way to speed it up again is to close access and open it again. Theres even a marked difference in speed between the first time I...
  10. M

    Troublesome textbox

    Hi Guys, Using a textbox to input information into a table, always in the same place. But I can't get it to work properly. Every time I run it, it comes up with a box that wants a value for strPath. See code below: Private Sub EnterPath_AfterUpdate() Dim strPath As String On Error Resume...
  11. M

    Need user to input file path, whats the best way?

    Hi Guys, I need something that will allow the user to enter a file path before running a function. I was thinking using a combo box or something on the main form, but I'm not sure. If this is the best way how would I link whatever is entered with a variable in the code? Cheers for your...
  12. M

    Simple Database over 500Mb in size, why?

    Hi Guys, The Problem: I have a database that I’ve been working on for the last few months that I have realised this morning has grown to a file size of 556Mb! It’s a database that allows a user to import txt files (of about an average of 6k records) into it and then run several vba functions...
  13. M

    Setting primary key in Vba

    My code imports data and creates a table to store it in. I need to set up a relation and to do this i first need to set the primary key automatically in the code. I have been playing around with two different solutions but neither work. The first: DoCmd.RunSQL = CREATE INDEX ind ON [Data...
  14. M

    db.CreateRelation problem

    Am trying to create a relationship between two tables in VBA using: Dim rel As Relation Set rel = db.CreateRelation("AtoB", "[Data Conversion].Primary", "[Data Word Table].[Primary Key]") Ive tried several varients, but cannot get it to work. At the moment when i run it, it comes up with...
  15. M

    Dlookup Problem

    Hi guys, Every time I run the code: strSB = DLookup("Description", "SA R Lookup", "[Binary]=" & strSubAdr) & " To " & DLookup("[Equipment]", "Serial Destinations", "[ST]=" & Word1) I get the error: 'You canceled the previous operation' The first Dlookup runs fine on its own, the...
  16. M

    Help with SQL UPDATE command

    Hi Guys, I am trying to use an UPDATE command to change a record. The UPDATE result is dependant on two variables. One to indicate which record ( j ) and one to indicate the information to put in the record ( Comp ) this is what ive written: DoCmd.RunSQL "UPDATE [Command Data Table] SET...
  17. M

    Running function on field and saving results to new table

    Hi guys, I have been struggling with this one all morning and can't seem to get anywhere. I need to run a function on a whole field of data and return the results to a new field in a blank table. I have been trying to use SQL functions without any luck. I'm pretty new to VBA so nice and...
  18. M

    Newbee needs help.

    Hi Guys, I am very new to VB programming (started last week) and have minimal previous experience with other languages. I have thrown myself straight into the deep-end and I am trying to create a database with a large amount of procedures. A quick summary would be an engineering database...
Back
Top Bottom