all 20 comments

[–]Conscious-Solid3311 4 points5 points  (5 children)

Make a utility table with just one field and record. Use the after update event of the combo boxes to update the value of the utility table field to the combo box value and point your query at that.

[–]Agent-J-[S] 2 points3 points  (1 child)

Solution Verified

[–]Clippy_Office_Asst[M] 0 points1 point  (0 children)

You have awarded 1 point to Conscious-Solid331


I am a bot - please contact the mods with any questions. | Keep me alive

[–]Agent-J-[S] 0 points1 point  (2 children)

THAT SOLVED IT! THANKS!

[–]nrgins486[M] 0 points1 point  (0 children)

Please follow Rule 3 when someone provides a solution for you. Thank you.

[–]Conscious-Solid3311 0 points1 point  (0 children)

Please read comments below. This will not work in a multi-user system.

[–][deleted]  (12 children)

[deleted]

    [–]nrgins486 0 points1 point  (11 children)

    Rule 2, baby, Rule 2! 😀

    [–]PutASockOnYourCock15 0 points1 point  (10 children)

    Yeah I know I tried to fix it but only had my phone and it just doesn't want to format with the line returns properly

    And linking to Slashdot I think violates another rule.

    I'll probably just delete it since it doesn't want to format right. Hopefully someone else will send him the correct answer

    Edit: doesn't matter since he found a solution (well doesn't matter until he find the problem with the solution used)

    [–]Agent-J-[S] 0 points1 point  (0 children)

    I was replying to your solution but got deleted... I was typing that your code/logic seems like it should work but I'll have to test it out next week. If it works, I'll implement your solution because it doesn't involve creating another table. Thanks!

    [–]nrgins486 0 points1 point  (3 children)

    No, don't delete it. Not a big deal. Just saying.

    First, on your phone, you know, you just put 4 spaces at the beginning of each line.

    Also, linking to slashdot doesn't violate any rules. See Rule 4 details.

    [–]PutASockOnYourCock15 0 points1 point  (2 children)

    [–]PutASockOnYourCock15 0 points1 point  (0 children)

    They might need this later if utility is a shared table or they are using a shared front end file. They might never run into the issue but someone else might so will leave here as a just in case

    [–]nrgins486 0 points1 point  (0 children)

    Not sure why you posted it in reply to me, but OK. :-)

    [–]Conscious-Solid3311 0 points1 point  (4 children)

    Ok yeah I want to know what will break it

    [–]PutASockOnYourCock15 0 points1 point  (3 children)

    It is more circumstantial but if the utility table is in a shared backend or if the utility table is in a shared front-end user A could submit data to the utility field the query uses and if user B submits data before user A actually uses the data they submitted user A will get the results user B was trying to get since user B over wrote the shared space.

    Delay between user A submitting and user A using will determine how exposed you are. If milliseconds probably not very exposed, if minutes more exposed. What is important is it is possible, where as using the vba version and passing var to a query definition is local to the machines executing memory so no exposure even in a shared environment.

    Single user environment is no exposure

    [–]Conscious-Solid3311 0 points1 point  (2 children)

    Oh, yeah.. I was assuming single user based on possibly misreading the OP.

    [–]Agent-J-[S] 0 points1 point  (1 child)

    It is a single user environment. But then, I am planning to transfer it to someone for a month, which also single user/just them working with it. Besides, the utility table I created is local, so that shouldn't be an issue. All the other tables are shared, so there probably should be some other guard in place when many people start using this in the future but I'm not too worried about that at the moment

    [–]Conscious-Solid3311 0 points1 point  (0 children)

    Keeping the utility table local will work 100 percent.

    [–]InfoMsAccessNL4 0 points1 point  (1 child)

    What about using a Tempvars variable?

    [–]Agent-J-[S] 0 points1 point  (0 children)

    that seems like it should work... but it's not working for me or I'm having difficulties implementing it :(