Lister
08-16-2004, 06:18 PM
Hey guys
I have been toying with the idea of a simple validation form for a input screen.
I have a list box with all the utensils in my kitchen draw. If I buy a new item and I want to add it to my inventory, first I want to check that I haven?t already got one. I type the item number in the Unbound field then click the [Is This In My Draw?].Button
The code would then check the item numbers the ListBox.Column(1), if there is a match it would open the form [What?s In My Draw] and tell me what I paid for it.
But if there is no match run the error message. Run the Yes/No error message box and ask me if I wished to add the ?new? item to the draw.
Yes = Blank [What?s In My Draw] form ready for input.
No = End Sub
Now when you have a look at my code I know that what I have for checking the ListBox0.Column(1) against the unbound Text.6 is rubbish.
And I know that there should be a Loop out there that can run through the items in the ListBox and compare it with the value in the Unbound field ([Is this in My Draw?])
But I have been unable with my limited knolage of loops to create one that will work error free.
And after a few hours of crawling through the search of list boxes and code I?m having a break and going to bed.
So I just banged it out because I know it will run with no errors stopping it, and with any luck will give you and idea of what I'm after.
I know that someone out there will think that this is a "doodle" and post the code that I am missing. (I hope)
Anyway have a look and see if you can help.
It?s in Access2K
Thanks all.
I have been toying with the idea of a simple validation form for a input screen.
I have a list box with all the utensils in my kitchen draw. If I buy a new item and I want to add it to my inventory, first I want to check that I haven?t already got one. I type the item number in the Unbound field then click the [Is This In My Draw?].Button
The code would then check the item numbers the ListBox.Column(1), if there is a match it would open the form [What?s In My Draw] and tell me what I paid for it.
But if there is no match run the error message. Run the Yes/No error message box and ask me if I wished to add the ?new? item to the draw.
Yes = Blank [What?s In My Draw] form ready for input.
No = End Sub
Now when you have a look at my code I know that what I have for checking the ListBox0.Column(1) against the unbound Text.6 is rubbish.
And I know that there should be a Loop out there that can run through the items in the ListBox and compare it with the value in the Unbound field ([Is this in My Draw?])
But I have been unable with my limited knolage of loops to create one that will work error free.
And after a few hours of crawling through the search of list boxes and code I?m having a break and going to bed.
So I just banged it out because I know it will run with no errors stopping it, and with any luck will give you and idea of what I'm after.
I know that someone out there will think that this is a "doodle" and post the code that I am missing. (I hope)
Anyway have a look and see if you can help.
It?s in Access2K
Thanks all.