Checking values in different fields.

Hello, I was wondering if anyone could help me with something.

I currently have a table with stock levels and a re-order level.  When the 
stock level gets below the re-order level I then contact the supplier and 
order new stock.

I was wanting to create a query that checks the values of these two fields 
and then shows me all the records that need re-ordering.  I however, don't 
know how to compare the values of two fields.  Could anyone give me a hand?

Many thanks.
0
Utf
5/9/2007 10:35:01 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
699 Views

Similar Articles

[PageSpeed] 25

On Wed, 9 May 2007 15:35:01 -0700, rednikcam wrote:

> Hello, I was wondering if anyone could help me with something.
> 
> I currently have a table with stock levels and a re-order level.  When the 
> stock level gets below the re-order level I then contact the supplier and 
> order new stock.
> 
> I was wanting to create a query that checks the values of these two fields 
> and then shows me all the records that need re-ordering.  I however, don't 
> know how to compare the values of two fields.  Could anyone give me a hand?
> 
> Many thanks.

In a query?
Add a new column in addition to the stock items.
TimeToBuy:[StockLevel]<=[ReorderLevel]

As criteria on this column, write
True

If you wish to show the items that are not necessary to re-order set
the criteria to 
False
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
0
fredg
5/9/2007 10:49:04 PM
Reply:

Similar Artilces:

void partially applied payables checks
Must be able to void partially applied payables payments and credit memos. The need to create a dummy voucher is cumbersome and creates unnecessary GL entries. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGr...

Round up a decimal in a query field
Hopefully this is an easy question. How do you round up a number in a query field? Excel has the ROUNDUP function, but I can't find anything similar in Access. Can anyone help? Function:round([tablename!fieldname,2]) I think. It may be round([tablesname!fieldname],2) "bigomega73" wrote: > Hopefully this is an easy question. How do you round up a number in a query > field? Excel has the ROUNDUP function, but I can't find anything similar in > Access. Can anyone help? Thanks Golfinray, but that only rounds to the nearest decimal place. What I want is the numb...

Cell Values Not There ???
I'm using VBA code in Excel 2007. I am having a strange problem. The cells have content. Some of them, but not all of them, are selected from Data Validation lists (drawn from a named range). However, when I try to access their values in VBA, it says they are empty!'' For example, the simple code: Debug.Print "Cell value is: " & ActiveSheet.Cells(2, 7).Value results in the output: Cell value is: I even tried the following code, to make sure it was not a problem with the ActiveSheet reference: ThisWorkbook.Sheets("Form").Cells(2, 7)....

Re: Is there a way to HIDE a row based on a value of a cell ?
Hi Reddance, Try instead: Sub Tester() Dim rng As Range Dim i As Long If LCase(Sheets("Ctrl").Range("A1").Value) _ <> "yes" Then Exit Sub End If With Sheets("ToPrint") For i = 5 To .UsedRange.Rows.Count Step 2 If Not rng Is Nothing Then Set rng = Union(rng, .Cells(i, "A")) Else Set rng = .Cells(i, "A") End If Next i End With If Not rng Is Nothing Then rng.EntireRow.Hidden = True End If ...

Required fields
I need to set up some VB code to alert the inputter that they need to complete a couple of required fields depending on the value of a third field. At present I have some code (below) attached to the BeforeUpdate event of the form that checks for one of the fields but I need to extend it to the 2nd field and I don't know how to. Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.[NYSPA Received] And IsNull(Me.Date_NYSPA_Received) And Me.New_Cease = "New" Then MsgBox "Date NYSPA Received is required" & vbCrLf & "Record will not be saved&q...

How do I format a field based on the value
I have a form that is populated from a query using several tables. In the detail section I have the following fields: Category Code qty PO number ... .... ... The qty is populated in the query based on whether or not a PO number is available. If the PO number is not available then it comes from table a, if it is available then it comes from table b. On the form, I have my fields color-coded for easy reading. I would like to be able to color the border and column heading based on where this value comes from. If table A, then it is blue, if table b then it...

Keep Added Custom Fields on New Projects
We are importing information from our bidding software. The export is created in XML file. We know the custom fields that are created. How do I make MS Project use the same "look" everytime? I want it to remember the custom fields I created and use that as my default blank project. I don't care about the tasks because those could be different every time. I just want to be able to create each project with the same columns every time. Create or update a view/table with the custom fields and layout you are wanting. Then change the Tools-->Options--View tab to ...

how to retrieve varbinary field through ADO inVC++?
...

How to check if mouse wheel has been used, system-wide?
Hi! I have the following task - I need to check time to time if mouse wheel has been used by the user, in ANY application. I have some kind of user activity detector, to do certain actions in application when user is idle for some time. It would be nice to have the ability to check if mouse wheel has been used. I already know how to check for keyboard (GetKeyboardState and compare with previous call's result) and mouse (GetCursorPos and compare with previous call's result). I know how to set up a hook, and can achieve what I need via hook. But, customer says sometimes system runs slo...

Calculated Fields
Is there a way to use an IF or SUMIF function in a calculated field in a pivot table? When I try, I get all 0s as the result. Can you type a small sample of the pivot table layout and data, and explain what you'd like to calculate with a SUMIF formula? Jim C. wrote: > Is there a way to use an IF or SUMIF function in a > calculated field in a pivot table? When I try, I get all > 0s as the result. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html Hi Jim, > Is there a way to use an IF or SUMIF function in a > calculated f...

Why do sheet tabs keep disappearing? Box in Tools is checked.
When I open a new or existing Excel file, the sheet tabs at the bottom may or may not show up. I have repeatedly gone to Tools, Options, View and made sure the sheet tabs box is checked, but still no tabs. How do I get them back? I can't get from one page of a workbook to another. This is in Offfice 2003. Hi Arlie, Try Tools/Options/General In the Sheets in new workbook box, check and see how many sheets are set to appear when opening a new workbook. Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://w...

Populating an IMAP "To:" field
I let this bug me for almost 2 years, but it *IS* Possible, as the following points out (contrary to the lack of responses and denial posted elsewhere in these microsoft misinformation forums): For Outlook 2000/XP/2002: http://support.microsoft.com/?kbid=284371 For Outlook 2003: 1) Select the IMAP mail folder with the broken/empty "To:" field. 2) Go to the "Tools" menu and select "Rules and Alerts..." 3) Select the IMAP account for this folder (should be pre-selected) 4) Click the "New Rule..." button 5) Select the "Start from a blank rule" r...

Set a recurring task ie. a task to check a website each month
It would be advantageous to be able to set a recurring task ie. a daily, weekly, monthly or other multiple task. An example would be if you needed to go to an accounts website or prospects website once a month to look for leads. Or to check out a competitor for new things on their website. It could also apply to phoning or mailing etc. This would save constantly having to remember to create a followup or write up to dozens of followups at different dates. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote f...

Check Boxes #6
Is there an "easy" way to add check boxes to a worksheet? As it stands, I have to manually attach it to the underlying cell, and adjust the size. I would like to add several hundred checkboxes. Am I doing somethig wrong, or is it just that akward and labor intensive in Excel? Hi Adam, Try: '=============>> Public Sub Tester01() Dim SH As Worksheet Dim rng As Range Dim rCell As Range Set SH = ActiveSheet '<<==== CHANGE Set rng = SH.Range("A1:A100") '<<==== CHANGE Application.ScreenUp...

auto populating account id field
Does anyone know of any 3rd parties that already have this customization? I'm wanting my account to automatically be assigned an account ID when I transfer my lead to an account and then have this ID be sent to Great Plains to create the account in GP. I know CRM doesn't have this function right out of the box, but I can't let my users type in their own ID. Thanks, Jen ...

Max Value
I am trying to use Conditional Formatting to find the Max value in a Row using =Max(B6:AC6), having that cell Highlight to a different color but the =Max is highlighting them all. Help phuser wrote: >I am trying to use Conditional Formatting to find the Max value in a Row >using =Max(B6:AC6), having that cell Highlight to a different color but the >=Max is highlighting them all. > There may be other ways, but what I do is create a column, or in your case cell, (can be hidden, or way out of sight) having the formula =Max(B6:AC6). Then use the value of that cell as the co...

Xpath with multiple values..
Is is possible to use XPath with multiple values like in SQL Queries (AND Clause).For example: If I have xml: <rows> <row code=1/> <row code=2/> <row code=3/> <row code=5/> <row code=6/> <row code=7/> <row code=100/> </rows> Now I want only to select rows 1,2,3 an 100 XPath("rows/row[@code='1' and @code='2' and @code='3' or @code='100']"). I tryed like this above, but I got nothing. Any examples. Regards. Try using ORs all the way. An AND situation is impossible here...

Document extra check was printed and mark it void
I'm trying to figure out how to tell GP8 that an extra check was printed but we need it to be void. We printed checks today and accidently printed 1 more than we should have. Since we used that check number, GP will move on to the next one. We want to be able to go into GP and document that we did print that check but it should be void. Does that make sense to anyone? Did that exra check print on a check or on blank paper. Do you want to re-use that check number? I'm not 100% with GP 8, but in 10 you just go to "Void Historical Transactions" and void the check. ...

checking
Checking ...

Formula involving different sheets
Hi Using Excel 2003. In sheet 1, cell A1: =200/1200 In sheet 2, cell B2: =300/1200 In sheet 3 in a cell, I want to do =200/1200 + 300/1200 by cell reference. How do I do so? Thanks. Your formula would be: =sheet1!a1+sheet2!b2 The best way to create these formulae is to get Excel to do it. 1: Type = into your cell 2: Navigate to your sheet1!a1 cell. You will notice in the formula bar that Excel is adding its address to your formula 3: Type + 4: Navigate to your sheet2!b2 cell. 5: Hit enter Once you learn this, you will never type a cell address again. Regar...

How to fill cell with two combobox values?
I am looking for VB code for command button that fills two combo box values and a toggle value (Y/N) behind each other in one cell. Bart Excel 2003 ...

How do I assign a set of values to a selection from a drop list?
Hi. I am trying to assign a set of values, in separate fields ,to a each selection from a drop-down list in Excel (using data validation). What I am trying to do is very smilar to, say, to selecting a SKU from a list and having the product description, unit price etc. fill into their corresponding fields automatically. For example, I pick SKU "11111" from a drop-down list to fill the SKU field, then, automatically, "5-inch widget" comes up in the product description field and "$5.00" shows up in the unit price field. Please help. Mike Along with the d...

How to clean 0x0E value from file when using XSL?
I have some code that cleans up an xml file before running xsl transformation on it due to what I call bad characters in the data. I have as an example: str = Replace(str, "&#x19;", ".") str = Replace(str, "&#x18;", ".") In there as filters to strip out characters XSL doesn't like and replace it with periods. I am now getting an exception of a hex value of 0x0E however can't figure out what the string replace value should be for this one. From what I can tell, it's some kind of "shift out" character whatever that is. A...

Reporting table fields vertically
I've come across a client with a non-normalized table with sales of items for eight different regions. So, the fields in the table are: ItemCode Region1SalesQty Region2SalesQty .... .... Region8SalesQty Typically the client is printing these sales in columns, with a report that has the eight regions spaced horizontally across the page. Something like this: ItemCode Region1SalesQty Region2SalesQty ... Region8SalesQty However, they now need a report with the sales reported vertically, like this: ItemCode Region1SalesQty Region2SalesQty ...

Q: How different colum-widths?
Hello NG, i am working on a word document, wich contains some excel sheets as inserted objects. now i want to merge some of these excelsheets. unfortunately they have different coloum- widths. is it possible to merge them and say to ecxel, that from here and further down to use different coloum- widths, then in the upper part of the sheet? thanx, Tom. -- _______________________ http://tom.lautenbacher.biz _______________________ Excel doesn't support different columnwidths per row. You might be able simulate it by merging cells together (format|cells|alignment tab). But merging ...