Each user belongs to many programs. Their string is as follows:
"'Accounting','Marketing','Finance',"
Now items belong to certain groups. Like a vehicle belongs to the accounting program.
Its easy enough to see if a user belongs to a program
WHERE userprogram like '*" & textbox & "*'
And thanks to this forum, it is easy enough to see if a vehicle is within the user's string
WHERE itemprogram in (" & varHoldingUsersProgram & ")
Now I want to complecate it slightly. I want vehicles to belong to multiple programs.
ie: user's string "'Accounting','Marketing','Finance',"
vehicles string "'Accounting','HRM',"
I want the user to be able to book the vehicle. I want the vehicles to be in a drop down list.
currently the code is:
getprog = dlookup("program", "user", "username = '" & txUserName & "'")
ComboBox. RowSource = "select vehicle from vehicle where program in (" & getprog & ");"
How can I modify it so that if one prgram from the strings match, then the vehicle will be selected. Help me. I think my brain is broken. I hope that makes sense because it doesnt to me. Thank you
"'Accounting','Marketing','Finance',"
Now items belong to certain groups. Like a vehicle belongs to the accounting program.
Its easy enough to see if a user belongs to a program
WHERE userprogram like '*" & textbox & "*'
And thanks to this forum, it is easy enough to see if a vehicle is within the user's string
WHERE itemprogram in (" & varHoldingUsersProgram & ")
Now I want to complecate it slightly. I want vehicles to belong to multiple programs.
ie: user's string "'Accounting','Marketing','Finance',"
vehicles string "'Accounting','HRM',"
I want the user to be able to book the vehicle. I want the vehicles to be in a drop down list.
currently the code is:
getprog = dlookup("program", "user", "username = '" & txUserName & "'")
ComboBox. RowSource = "select vehicle from vehicle where program in (" & getprog & ");"
How can I modify it so that if one prgram from the strings match, then the vehicle will be selected. Help me. I think my brain is broken. I hope that makes sense because it doesnt to me. Thank you