Search results

  1. J

    RunCode not finding VBA code

    That was what I needed. Thanks! It works perfectly now.
  2. J

    RunCode not finding VBA code

    I guess that is what I am trying to do, put the code in a function. I have it in a Sub in the code part of my form. Is this what you were referring to when you say Function? I am not really sure how to get my macro to run this first then run the next part of the macro to import the text file...
  3. J

    RunCode not finding VBA code

    I am trying to incorportate this code CurrentDb.Execute "DELETE FROM CAFILE" into a macro. What I want the macro to do is delete the contents of the file named CAFILE and then import a text file I have on a shared network drive to replace the contents of CAFILE. I am not able to get the macro...
  4. J

    Importing file and replacing existing file contents

    When I add the DoCmd.TransferText what is the syntax going to be because I am importing a text file from a shared network drive and need to reformat the field from a number to text format. In my macro I was able to include specifications that I had saved when I imported the file the first time...
  5. J

    Importing file and replacing existing file contents

    When I transfer the text to the table it will add to what is already there right? I want it to overwrite the existing data. As far as the text being linked to the table, it is not. The imported text file becomes the table that is my queries are based on.
  6. J

    Importing file and replacing existing file contents

    The file is linked like it is a table. I have no problem deleting it manually, it is just when the macro runs it will not allow deletion. What would the VBA code look like if I wanted to import and replace the contents of the existing file?
  7. J

    Importing file and replacing existing file contents

    I have a macro that will import a text file call CAFile from a network location into my database and will also delete the existing file with the same name because it is an ever changing file. I am running into a problem because I need to be able to delete the existing file but it is used in...
  8. J

    Importing Text file with numbers that need to be text format

    I am trying create a macro that will import a txt file that has just one column of 16 digit numbers. I need to be able to export these numbers and convert them to text format so it will not be an exponent in Access. Also, I need for this macro to replace the existing data in Access table that I...
  9. J

    If statement in query

    It used to be a number field and I recently changed it to a text. It was throwing me as well. Thanks again.
  10. J

    If statement in query

    That's it. Thanks for all of the help!!!!
  11. J

    If statement in query

    I am thinking that trying to convert a number to text could be the problem. What I have is exactly like your example except for the numbers I am using.
  12. J

    If statement in query

    No, it is just one table. I do have a form setup that allows the user to select what criteria they would like to see such as a 0 or 1 which I would like to change over to Lost or Stolen. Also, the result does not necessarily have to be in my query. I really just need it on the report because...
  13. J

    If statement in query

    I can not get anything to work with this formula. I do know it is a no-no to have a space in the field name.
  14. J

    If statement in query

    It is just not working. This is sort of what I want to see happen: Loss: IIf([numType Loss]=0,"Lost",IIf([numType Loss]=1,"Stolen"," ")) I am not sure if this is the correct syntax to add other variables or not. I want it to return Lost if it is a 0 or Stolen if it is 1 otherwise return...
  15. J

    If statement in query

    That's what I had. It says my expression is typed incorrectly or too complex to evaluate. What is the purpose of the "1" in the expression?
  16. J

    If statement in query

    numType Loss
  17. J

    If statement in query

    I am getting an error saying the expression is too complicated. I used the exact phrasing in your example. Any ideas on the problem? I do have 5 different numbers that I need to convert to a word if it is true.
  18. J

    If statement in query

    I would like to insert an if then type variable in my query or when using SQL it is called case. Basically I want to say if MyField = 0 then Lost, if MyField = 1, then Stolen and so on like that. Is this possible? Thanks for the help.
  19. J

    Reports will not print sometimes

    I have several reports that the user will first view in print preview then has the option to print. On occassions when the user selects to print the report it will be sent to the printer (the printer shows it queued) but will not print. I can not put my finger on the problem because it is not...
  20. J

    Date field updates with day

    What would the formating in the query look like?
Back
Top Bottom