Multi select records in a shared back end database (1 Viewer)

yeasir01

Registered User.
Local time
Yesterday, 22:10
Joined
Mar 26, 2018
Messages
67
how do I interpret this into usable data for query search

as I suggested



but that is slightly wrong, it should be

eval("|" & ID & "| in (|" & forms!myform!selectedlist & ")")

So your report query will look something like

SELECT *
FROM myTable
WHERE eval("|" & ID & "| in (|" & forms!myform!selectedlist & ")")=true

I made the changes & uploaded the database.

also, updated form location & I keep getting an error the expression is typed incorrectly....
 

Attachments

  • ShelfTagApp.accdb
    1.3 MB · Views: 45

CJ_London

Super Moderator
Staff member
Local time
Today, 05:10
Joined
Feb 19, 2013
Messages
16,553
@yeasir - not sure what happened there you seen to be quoting a post I didn't complete. Please review my last post (time 9:24), you need to use the instr function, not the eval function
 

yeasir01

Registered User.
Local time
Yesterday, 22:10
Joined
Mar 26, 2018
Messages
67
@yeasir - not sure what happened there you seen to be quoting a post I didn't complete. Please review my last post (time 9:24), you need to use the instr function, not the eval function

I just tried that one & im getting a
This specified field [ID] could refer to more than one table....
 

yeasir01

Registered User.
Local time
Yesterday, 22:10
Joined
Mar 26, 2018
Messages
67
@yeasir - not sure what happened there you seen to be quoting a post I didn't complete. Please review my last post (time 9:24), you need to use the instr function, not the eval function

Im sorry I figured out that I wasnt refering to the correct table, it worked Thanks a million!:banghead:
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:10
Joined
Feb 19, 2013
Messages
16,553
This specified field [ID] could refer to more than one table....
glad you got it sorted. When naming fields it is s good design principle to always name your fields in the context of the whole app, not just the table. So ID as a name is relevant to the table, but not the whole app (ID of which table?) so better to give it a name like productID or customerID

Personally I do not use ID as a suffix for primary/foreign keys but PK and FK so the only time you need to specify the table is if the query has two or more foreign tables, but more importantly, I know which end of the join each field is which makes it easier when developing complex queries.
 

Users who are viewing this thread

Top Bottom