Hmm... that worked on my desktop, but not on my laptop. Both are running the same install, afaik.
No biggie. As long as one of them works, I can get what I need.
I've changed from Write # to Print # to get tab-delimited instead. Other than that, I think this part is good to go!
Thanks very much =)
**edit**
I hadn't seen ADezii's post when I wrote this. I'll try the explicit...
User Profile
Collapse
-
Thanks again, Mary, but still getting the type mismatch error. I did not have a DAO reference, so I tried each of the 3 available in turn. None gave me a different result. In desperation, I closed everything and recompiled, but of course that did nothing.
Could the error have something to do with my form or tables? Or is it most likely something in the VBA script?Leave a comment:
-
Sorry Mary - my response implied incorrectly that it was part of your example. I discovered it wasn't appropriate to the code, so have since removed it.
I've also tried using Close in the beginning of the code, but that now gives a Type Mismatch error. I guess that means there's something wrong with the variable declaration, but I don't see how using RecordsetClone would violate strict typing. Here's my current code:
...Leave a comment:
-
Trying Mary's mods, I am getting an error: File Already Open. The code is attached to a button on the results form.
I've checked to see if the CSV file actually is open, but it ain't. This happens even after closing and reopening the db. I've also tried changing the location and just deleting the file, but that results in an Object Required notice as expected.
I also have a problem with the As Database declaration throwing...Leave a comment:
-
Export search results from Form to CSV (macro)
I have a search form that returns records to another form, rather than a table. Here are my questions:
1) Is it possible to export the form results (as opposed to query results) to CSV? I've been successful at exporting a table of results before, but not a form.
2) If so, can this be done via macro?
3) If a macro is possible, can the macro further allow the user to choose location and filename when exporting?... -
Thanks again, Mary. I added &, but also declared a variable for Chr$(34) which seems to make everything happy.
For reference, here's what I ended up with:
Code:Private Sub cmdFindRecords_Click() Dim strFilter As String Dim strQt As String strFilter = "" strQt = Chr$(34) If Not IsNull(Me!txtFindTitle) Then strFilter = strFilter & "[cardTitle]="
Leave a comment:
-
Gotcha.
Ok, I'm working through this approach, and have started with just a single search for a keyword. I have done this with a simple query, but am having trouble with this part of the script:
Code:If Not IsNull(Me!txtFindTitle) Then strFilter = strFilter & "[cardTitle]=" Chr(34) & Me!txtFindTitle & Chr(34) & " AND "
Leave a comment:
-
Wow!
Thanks to both of you for great replies. I'm going to spend some time digesting these so I can find the right solution for me.
Christina - I've taken the liberty of beginning to convert that article to a PDF for easy reference. If you'd like it, let me know and I'll post it somewhere for you. It's only got basic formatting for the moment, but I can do some doctoring if you like.
Mary - I presume that...Leave a comment:
-
Search Form: multiple controls (Access 2003)
Hi all,
I'm not very conversant with the vocabulary of Access, so please ask for clarification if necessary...
I am trying to build a search form that allows combinations of search terms. For example, let's say I have three controls on my form; year, keyword, location. Entering a valid value for all three gives expected results from the dataset. However, I'd like to interpret a blank field in the search form as ignoring...
No activity results to display
Show More
Leave a comment: