Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Stephens' Visual Basic Programming 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' Visual Basic Programming 24-Hour Trainer by Rod Stephens; ISBN: 978-0-470-94335-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' Visual Basic Programming 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 30th, 2014, 03:37 AM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Select query in visual basic 6

Hi guys,

I'm a newbie to this forum and to vb6.I just want to ask some help for my query.

I have a table prodmaster with fields pieceCode,dozenCode,caseCode, proddesc ,inventoryUnit.
example: pieceCode=110 | dozenCode =111 | caseCode=112 | proddesc=apple | inventoryUnit=72


note: inventory unit is constant and all code refers to one item only
I also have a flexgrid and a txtinvno.text

If I put invoice number in the textbox say inv#00152
My flexgrid displays all the products issued in that invoice (inv#00152) and those products may be served in dozen,in piece or in case.


what I want to do now is if my flexgrid(2,1)=rs!pieceCode or flexgrid(2,1)=rs!dozenCode or flexgrid(2,1)=rs!caseCode then flexgrid(2,2)=flexgrid(2,2)/rs!inventoryUnit.

the value of flexgrid(2,1) piececode,dozencode,or casecode of the product issued since we serve some items in piece,dozen, or case.
the value of flexgrid(2,2) is the quantity issued.

.
can anybody out there help me? what should be my query for this.


I tried Select * from prodmaster where prodCode='"& flexgrid(2,1) &"' or dozenCode='"& flexgrid(2,1) &"' or caseCode='"& flexgrid(2,1) &"' ,

I know it can't be done this way,

help please.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
visual basic 6.0 flowertear Pro VB 6 3 June 28th, 2013 03:16 PM
Visual Basic 6.0 Ivy Pro VB 6 4 March 18th, 2009 07:49 AM
Visual Basic sandeepgreaternoida Visual Basic 2005 Basics 2 January 12th, 2009 02:40 AM
Visual basic update query barteksollie Access 1 August 7th, 2006 01:55 AM
FTP in Visual Studio 2005 Pro (Visual Basic) shoopes VB How-To 1 June 29th, 2006 02:08 PM



All times are GMT -4. The time now is 08:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.