I removed the Exit Sub then tried it again.
and that's the message I receive after this line is highlighted:
CurrentDb.QueryDefs("qrySelectedFields").SQL = strSQL
When I remove the stop and run the code - it receives another run-time error:
The SELECT statement includes a reserved word...
Namliam,
That is a great trick - I have read many books about the line-by-line but no one has made it understandable and easy as this. Thank you.
So, it went through each line, and when it got to:
CurrentDb.QueryDefs("qrySelectedFields").SQL = strSQL
a run-time error occurred:
Invalid SQL...
Sorry it didn't keep the format when I copied and paste, and got in a rush and click the submit button too soon.
I hope this is better:
Dim varItem As Variant
Dim strSQL As String
If Me.List62.ItemsSelected.Count = 0 Then
MsgBox "Please select one or more fields.", vbExclamation...
Access 2007-10
Listbox created: List62 (I know I need to rename it, but for now)
Multi-select: Extended
Row Source Type: Field List
Row Source: qryFieldList
Open Query: qrySelectedFields (I added primary key to first column, just to have at least one destination field).
Goal: to select...
I am looking for a way to generate a list of all fields within a table, have the end-user select which fields he/she wants to include, and then run the query. I am trying to create this within a form for a nice, easy to use GUI. Has anyone ever done this - and has examples? or can point me in...
Thank you Estuardo. The situation actually changed, so I am all set now. I appreciate your help! You actually helped me see how to use the call function.
Access 2007-2010 format
Form, 9 bound fields, grouped together Smart Tag = "UnitGroup"
Summary: Needing to run VBA whenever the value is changed within one (or more) of these fields. User could be placing new value (defaults at 0) or editing(changing) previous value entered.
I am not good on...
I tried it - but when setting the LimitToList to No - I still get the same message - The first visible column isn't equal to the bound column. If I keep the LimitToList set to Yes - it still gives me the "The text you enterested isn't an item in the list. Do you want to edit the items in the...
Unfortunately, that just makes it where they have to select the first column value or they receive a message "The value you entered isn't valid for this field".
The system actually won't allow me to set the Limit to List to no, because the first visible column isn't equal to the bound column. I do not want to change the first visible column to show the primary key (bound column), it doesn't mean anything to the user.
I realize I am in error not the...
Thanks Paul - I added that back in, I forgot to do that. However, it does not affect my results - the popup message still comes up. I tried using the List Item Edit Form - the popup message changed a little bit, but same thing. I don't want the popup window/message at all. That's why I am...