Update field based on qry results - not sure....

G

Guest

Hi there

I have a problem that I havn't been able to sort through tried various but haven't come up with solution.
I have a 'simple' inventory db. Tracking parts coming in and useage. Requirements are to not issue parts for a Sale unless all parts on sale are available (in stock). I have this requirement working via a cmd button on the 'sale' basically behind the cmd button is code whic
For that sal
1) writes to a temp table parts that could be issued because stock is avialable.
2) count the above record
3) count the number of records on tblsaledetail for that sal
4) if #records in temp table = #records on sale then all parts are in stock and I can issue - I change a flag to true and write the itemdetails table to track store parts used

The above is working fine. But it is slow as currently the user has to go to each individual 'sale' and press the button in order to see if the 'Sale' is good to go

What I have done also is if the statement 4 above is false all parts aren't available I've updated a HOLD table with the date ON hold
Now my problem. What I'd like to do is have a button - not related to a specific sale record - that will go and do something like the above mentioned qry's to tell me what Sales I can take off of hold. i.e. when new stock is recieved, press i.e. a Stock Check button. it all the parts on the sale are there enter current date into the dateoff hold field. This will allow me to give them a report to tell them what sales they can go an issue

basically my code is grouped and the where clause is HAVING tblesaleno.saleno = forms!frmsale!salen
How can I not include a specific saleno and still count # records for a certail sale? Does this make sense? If more info req'd please let me know
 
G

Guest

Not sure how to implement it though. I have a stockshortage form and report based on a query. If The sale doesn't show up in the Stockshortage form or query can I send information to a report for can issue
I can't just make the opposite query from above, because of the all parts need to be available issue

Can I do that? i.e.
based on a cmd button, if record count for a particular sale is 0 be part of the query results? Am I asking this question right? My brain is fried on this one...
Shawna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top