Thank you so much. It looks like when I retyped the code I forgot the "S" in ItemsSelected.
Literally I spent like 3 hours and I did not catch that. Thank you so much!!
and thank you for the tip. I am kind of new to access so I will use the correct terms next time
I actually tried on purpose to mistype the subform name to see if I will get the same error but I did get a different error "Method or Data Member not found"
I do not want to change the whole code, I just want to change this line to get the value from the listbox on the subform while I am on...
I double and triple checked the form name and field name and I think it is accurate. I did not get the second part of your answer
can you write the full code so I can try to apply it.
Thanks
I am trying to refer to a multi select listbox property on a subform from the main form. Sounds simple but I guess it is not. It is a part of long code and query in vba. The listbox will gather all the selections in the listbox to feed it into a query.
I had the listbox on a tabbed control on...
My original code is the one that lets the users select the file twice. The reason for the file dialogue prompt twice is this code
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "qryDepartment", selectFile, True - 1, "A1:C2"
DoCmd.TransferSpreadsheet acImport...
Sorry I took awhile to test the code. I couldn't make the code works based on my needs so I will let the users know to select the files twice to import it into the database
Hello sxschech,
I tried the code.
Me.txtLastImport = "" This was referring to a non-existent field so I removed it. I am not sure how important this is. After removing this, the code went through to let me select the file and to Enter the Name of the Table. Then in the module I got this error...
I have files that have extension of TSV which are text files but viewable in exel. I figured out a way for the user to click on a button in Access which does the following
1. Run Macro in Excel: The macro prompts the user to select the TSV file. After selection, macro opens the employee.tsv file...
vba - I put your SQL code in the SQL view and still returned ID with no records.
plog - thank you for the tip, your solution actually worked! It showed table1ID with record 1 which what I wanted. But why the location column is hidden? I tried adding the location to the query in design view...
This returned only one column "ID" with all four record and no DOB or Location column. I wanted only to show the record with ID 1 which would only come up if the query is Office and Home instead of Office or Home. But Office and Home don't work because it return empty record
I hope you do not...
I am so sorry for confusing you. I actually put the code that he gave me at the beginning to show him that it is not working. Please see attached below. This is what I meant with my query.
ID from table 1
DOB and Location from table 2
I want to show ID only once based that it has both Home and...
@vbaInet I don't care anymore what value shows in the location field. All I care about to filter the criteria correctly and show only the ID. Please help!
I cannot apply two criteria (Home and Office on the same column)
Please help. I am new to access
Thanks
Field Table1ID is not even in the query. The ID is coming from table 1, table1ID is coming from table 2.
how to do the query showing just ID 1 with the criteria of Home and Office?