Unanswered: Returning 1 record from numerous results
Hi, i have a filter button setup using macros and a query at the moment where it brings back all the records that is equal to certain criteria, what i would like it to do is only bring back 1 record from a result of i.e 20 once a button is clicked. how would my query look for this?as i would like it to only bring back 1 record at a time as the button would also add initials to the record of whos dealing with it(dont worry i have the initials function working)until all the records have been dealt with.
we have a table where someone adds all the callbacks for designated times, i.e. 10-12pm, 12-2pm, the query brings back all the records where the criteria is depending on what button they press 10-12pm,12-2pm etc....
when the button is pressed it brings back all the results i.e 20 records....and you can scroll through the records and cherry pcik which one you would like to call, what i would like is for the button to only return one record out of the 20 records so the person cannot scrolll through the results and cherry pick the records for the callback
or maybe if we can hide certain details on the form until someone presses the button, but would only show details from that record after its been pressed and the rest of the details on the other records stay hidden until the user is on that record and they press the button. if this makes sense?
it keeps on giving me this message "The SELECT statement includes a reserved word or argument name that is misspelled or missing, or the punctuation is incorrect"
this is the sql stament im using:
SELECT TOP 1
WHERE (((Workflow.[Preferred Contact Time])="10-12pm") AND ((Workflow.[Preferred Contact Date])<=Date()));
all sorted now pootle thanks but a quick question, if 2 users brought back the same result at the same time and then they updated the owner field with their initial at the same time using a macro would this crash the system?
It all depends. You are talking now about row locking and transactions. It also depends by what you mean by "crash the system".
Usually, by default, if that occurs the second user (the one that attained a lock on the row second) will get a message box telling them that another user has changed the row. They will be asked if they want to discard their changes or overwrite the changes of the first user.