airbaal
Oct 5th, 2000, 07:20 PM
I am new to VB 6.0 Enterprise after recently switching over from FileMaker because a) I was extremely limited on what I could do with FMPro and b) I much prefer using VB or C++ than FMPro scripts. I am setting up a database with the DataEnvironment and am having a little trouble viewing a customized set of records within a database table.
I have a database connection setup where VB sees all of the records in the table. However, in this one table, I could have 100 records that deal with invoice #100, and 20 records that deal with invoice #101. I am having a hard time coding it so the user can say, “Load Invoice #101” and only the 20 records are loaded.
I was hoping I could just do some sort of SQL statement where it would say:
SELECT invoice, part, retail FROM tblInvoices WHERE invoice=101
but I can’t figure out how to get around not hardcoding in the 101. I would like the user to be able to input 101 into a form layout’s text box and then after clicking a button, it calls the SQL script or ADO script.
I am still unfamiliar with how VB, ADO, and SQL exactly work together.
If I can’t view just certain records from a table, I guess I have to figure out ways to dynamically create new tables every time a new invoice # is created?
Does anyone have any suggestions?
THANK YOU in advance :-)
-Eric Baal
I have a database connection setup where VB sees all of the records in the table. However, in this one table, I could have 100 records that deal with invoice #100, and 20 records that deal with invoice #101. I am having a hard time coding it so the user can say, “Load Invoice #101” and only the 20 records are loaded.
I was hoping I could just do some sort of SQL statement where it would say:
SELECT invoice, part, retail FROM tblInvoices WHERE invoice=101
but I can’t figure out how to get around not hardcoding in the 101. I would like the user to be able to input 101 into a form layout’s text box and then after clicking a button, it calls the SQL script or ADO script.
I am still unfamiliar with how VB, ADO, and SQL exactly work together.
If I can’t view just certain records from a table, I guess I have to figure out ways to dynamically create new tables every time a new invoice # is created?
Does anyone have any suggestions?
THANK YOU in advance :-)
-Eric Baal