-
Amateur Question on Access VBA
Afternoon All.
I bet this probably comes off as a really newbish question, but I'm completely stuck!
I'm using VBA in Access 2000, and i'm trying to create an IF statement on an Access Form. What I'd like to do is create the statement using the field (Stock Level) from the Table 'tblStock'. I'd like it so that when Stock Level is equal to 0, a Message Box opens and says the name of the Product (Which is located in the Product field of tblStock).
I have the If code working with regular numbers, but I can't use it with data that can be found within fields that I've created.
Any help would be appreciated for a lifetime!
Thanks!
-
Welcome to DevX 
Are you familiar with SQL? Specifically (for this case) SELECT statements?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
I know dibs and dabs of SQL, but i'm afraid not in this scenario.
Thanks though, websites like this are always incredibly helpful!
-
Well, a SELECT query would return the stock level from the database.
That return would be stored in a variable and compared to whatever you are using on your form to deal with stock.
Transactions that took stock out or put stock in would either increment or decrement that value, and write the new value back using an UPDATE query.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Similar Threads
-
By alaska_eric in forum VB Classic
Replies: 1
Last Post: 03-15-2005, 04:31 PM
-
By MKayHavoc in forum VB Classic
Replies: 5
Last Post: 03-09-2005, 01:09 AM
-
By vinman in forum VB Classic
Replies: 3
Last Post: 02-22-2001, 10:40 PM
-
By dave in forum VB Classic
Replies: 3
Last Post: 02-19-2001, 07:07 PM
-
By John Simmons in forum Enterprise
Replies: 0
Last Post: 02-09-2001, 12:42 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks