I'm sure the concept is valid. I'm trying to pass the results of multiple combo boxes to a SQL string to be used in a query. Here's what I have so far. The message I get is "can't find the object 'stDocName'"
There may be issues beyond this. But I haven't gotten past this error...
This is what I have so far (in the unload event). My problem is the saveasquery command prompts for a filename and I can't figure out how or where to put the text and click the OK button. It will also prompt me that the file already exists and do I want to save anyway.
Also I'm not sure of how...
I'm trying to make it easy for a user to select all in a listbox.
This code works great for clearing all selections (lboTPromoID.Selected(varItem) = False). Why doesn't it work to select all when (varItem) = True?
Also, how can I accomplish my goal here?
Private Sub cmdSelectAll_Click()
On...
I'm attempting to give users the opportunity to specify the file name for a text export. I've put the code on the unload event of a form. Ideally, when the user clicks the "close" button, they are promted as to whether they want to export to a text file. If they select yes, then they...
I have an unbound form with a button that builds a "where" clause in an Access form filter.
Here is the Button "OnClick" code
Dim strWhere As String
strWhere = " 1=1 " & BuildIn(Me.lboTInterest_ID)
DoCmd.OpenForm "frmEmailResults"...
This looks simple enough to me, but it gives me a type mismatch error.
Private Sub Form_Close()
Dim Msg, Style, Title, Response, MyString
Msg = "Do you want to export to a text file?"
Style = "vbYesNoCancel"
Title = "Export?"...
I copied the following code from another post (Bob Scriver created the code). It is working (well sort of working) in a list box with multiselect set to simple. The problem is that it only works for values that are 10 and above. When I select any of the values 1 through 9 I get nothing in the...
Hello,
I'm sure this must be simple but can't find FAQ on it. I have a form with a list box with multiselect property set to simple.
I want the user to be able to clear the box (deselect everthing and start over) but can't figure out the code for the on-click property to make it work.
TIA...
The basic setup of the database is that a customer has bought a product and filled out a card listing what other things they might be interested in.
The marketing dept wants to pull a report of names and addresses of people interested in various other products.
There are about 20 possible...
I have table1 with 2 fields. Interest_code and CustomerID.
I want to use Interest_code as criteria in a parameter query. I want to be able to make several selections without separate parameter boxes.
I created table2 with 2 fields. Interest_Code and Interest_description. It is a list defining...
I often run a query and then delete the records that show up. I've got two tables. There is only one field in each table. I put both tables there, join on the field. Put the field in the grid that I want to see. Run the query. It gives me all records that are equal. At this point usually I just...
Hi,
I know this is probably really simple but I'm just not getting it.
I run a query and make a table with the desired fields. Then I export the table to excel. The problem is that some of the data in the phone field is formatted 000-000-0000 and some is not. So it shows up in the new table and...
Will someone please tell me why this doesn't work? I can't find any information to tell me what I'm doing wrong. I copied the SQL directly from the query and it does work. I
Private Sub optFindStore_AfterUpdate()
Call SetFormSQL
End Sub
Sub SetFormSQL()
Dim strSQL
Select Case...
I pick up this database and am trying to clean it up. In the process I've eliminated tables, renamed fields, etc. I also set up relationships. Now I have an issue with viewing a subdatasheet and do not know which thing I did that made the blunder.
When I click on the plus sign next to a record...
Here is my code so far. I would like this query info to return to the form instead of its own query window. This is an event in a class object.
Private Sub cmdFindStore_Click()
On Error GoTo Err_cmdFindStore_Click
Dim stDocName As String
stDocName = "qryStoreSearch"...
I have a form based on a query based on two tables -- and a subform based on another table. How do I force the subform to add a record if something changes on the main form.
I'm trying to use the before update property on the main form, but can't seem to see what code I need to write here. The...
I know this should be simple but It's just not coming to me. I've added a date field to my table and I need to populate all 7000+ records with a date. They will all have the same date for this initial setup. Any suggestions would be helpful.
TIA
Melanie
Can someone point me to a quick way to convert all records in a field to all caps. I don't mean just displaying it in caps, I can do that. I need to have the data stored in all caps, though it may be entered in any imaginable way.
Thanks,
Melanie
I'm trying to write a query to find records that have an asterisk (*) in them. Of course it could be anywhere in the field so I need to use a wildcard to find it. Normally I would use * as the wildcard but this doesn't work since I'm literally looking for that character. Can I do this?
Thanks...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.