Search results

  1. H

    Module to remove noisewords

    Having all kinds of problems with the code below... If I run it it gives out maxlocks errors. Ive moved the registry entry to the max but it still gives the error Public Function NoiseWords(sCompanyName As Variant) Dim sTestString As String Dim sTestString2 As String Dim sReturnString As...
  2. H

    Create one field from 3 using a function

    How can I create a function that receives 3 fields from a query but allows me to use the function so that I can return them as 1 field There will be some code that willl play around with the data in the 3 fields in the function but I dont now how to pass 3 fields into a function. Thanks
  3. H

    Wildcard using Mid statement

    Can anyone say what the syntax would be for the "incorrect" statement below? Like *Mid([checking]![COMPANY NAME],1,InStr([checking]![COMPANY NAME]," "))* As the statement above doesnt work, just returns errors. Thanks in advance
  4. H

    Access table to DBASEIV

    Im having lots of trouble exporting an access table to dbaseIV format. First it grumbled about lengths of field headers which I belive now dbase has a restriction of 10chrs. Are there any other restrictions I should know about as the file still wont export to dbaseIV Thanks in advance
  5. H

    Cycling through a recordset

    I have the SQL below SQL = "SELECT TOP 300 FROM [EXPORT]WHERE [DISTRICT]=" & """RSnEW(0) " & " ORDER BY [EMPLOYEE SIZE];" I want to put it in a loop so that it will cycle through the rsNew recordset running the sql each time. I get errors on the sql but dont know why How should the SQL look?
  6. H

    check if file exists

    Hi I need to check whether a file exists before continuing the code. Not sure haw to check if a file exists. Thanks in advance
  7. H

    Merging 2 Text files

    Im trying to merge 2 text files together in VB but im unsure how to go about it. I know there is a DOS command ie COPY file1.txt + file2.txt file3 This is what im looking to do. The layout of the 2 files will always be the same.
  8. H

    Problem with FINDFIRST

    I keep getting "operation not supported for this type of object" for the code below. Any ideas strURN = rsOriginal(0) rsNewDirs.FindFirst "[fieldname] =" & strLocURN Thanks in advance
  9. H

    Item is read only

    When I try to run the code below the btnprocess_click gives me a item is read only. I cant see where Im going wrong. Any one help Public cnConnectString As String = "provider=microsoft.jet.oledb.4.0;Data Source=D:\B2BWork\MultiDirectors\multidirs.mdb;userid=admin;password=;" Public...
  10. H

    Using saved Outlook Template

    How can I used a saved template to send to a list of email addresses in an access table. I know how to open the outlook object etc and use VBA to send mail to people but dont know how I can use a saved template to do this with. All I will then do is loop through all the email addresses using...
  11. H

    Using Functions

    I have created the function below: Public Function StripSpace(txtField As String) As String Dim txtTemp As String For x = 1 To Len(txtField) If Mid(txtField, 1, x) <> " " Then txtTemp = txtTemp + Mid(txtField, 1, x) End If Next x txtField = txtTemp End Function...
  12. H

    Calculating months

    I have a series of dates and I want to convert the dates to months so that it would show how old in months the dates are. ie 05/05/2002 would be 24 months 05/05/2000 would be 48 months etc etc Thanks
  13. H

    Checking Items in a string

    Im trying to check for characters in a string but seem to be having problems I have the following but VBA doesnt like it. If Mid(Name, x, 1) not in("a","b") Then Your help is appreciated
  14. H

    Using Ado

    Can anyone help with some simple issues Im used to using dao dim db as database dim rs as recordset set db = currentdb set rs as db.openrecordset("dfsfdfsdf") etc How do i do this in ADO
  15. H

    Create Table with ADO

    Create a Table using VB How can i create a table using nothing but code. Thanx
  16. H

    Access Beep

    Is there a way to turn off the annoying beep that access does whenever it confirms anything. It beeps when changing tables and finishing queries and also in find and replace Im sure there was something that could be changed in the registry but I cant remember what.
  17. H

    Using a For Next Loop to add Fields to a Table

    I'm using the code below For x = 1 To 10 DBase.Execute "ALTER TABLE Results ADD COLUMN TEST(x) TEXT;" Next x Keep getting syntax errors. Any ideas?
  18. H

    Too few parameters

    Have the code belowPublic Sub MultiDirectors() Dim DBase As Database Dim rsSet As Recordset Dim rsResults As Recordset Dim qrydef As New QueryDef Set DBase = CurrentDb Set rsSet = DBase.OpenRecordset("directors") Set rsResults = DBase.OpenRecordset("results") Set qrydef =...
  19. H

    Appending Fields to a TAble

    How can I create extra fields in an existing table using code?
  20. H

    Changing password in code

    I've created a form which lets a user change there own password in the database. When it runs I get an error, I think the error relates to the users not having ADMIN rights to the database. I've tried : DBEngine(0).Users(txtUserName).Groups.Append ("supervisor") but I get a compile error...
Top Bottom