Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I say if one field is empty go to next

Status
Not open for further replies.

baycar

Technical User
Nov 25, 2003
13
CA
The 3 field I'm looking at are second returned length, first returned length and received length. I want query to start with second ... field and when is it see's it emty to go on to the first ... field and if its empty to go to th receivrd field . any help wold be greatly appreciated I have a fiew situation I can use this scenario.
 
Your question is not quite clear. Can you show an example of data you are using?
 
this is an steel inventory database for example if I had a steel flat bar when received was 240"long . I needed a piece that was 36" long I return to stock 204" long . the next day I use up 120" inches and return 84" to stock now six months later I call up this piece of flat bar but I want to tell me it 84" long not 240" long. Now in this inventory I have over 3000 pieces I need to remember the original length when purchased and how many times its been used and where this is why I have 3 diferent fields to show the lengths now starting from the second returned length field if no lengths appear then it automaticly goes to the first returned length field If it is also empty then go to received length
 

if isblank(second returned length.value) then
first returned length.setfocus
if isblank(first returned length.value) then
received length.setfocus
else
end if
else
end if

This code is incomplete as I'm not sure how you'll be using it. But this would be the logic.

 
From the sound of what you describe, I would make the following suggestion:

1. create a table of stock that contains data about purchase length, cost, type, description, etc. These are thing that would not change.

2. create a usage table that would show how much you use, dimentions, etc.

3. create a current table that would show what you actually have.

Have a material id that would be in all three tables to identify each type of stock accross all three tables.

Then you can run queries to check stock and price changes, etc.

This is just my 2 cents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top