Hi,

Im building a database in Access with the use of VB.

If I have 2 tables, both of which will be used as a subreport/form:
1 - Invoice Details
a - Invoice Number : Integer
b - Item: String
c - Quantity - Number
d - Rate/Cost/Wateva - Currency
e - Amount - Currency (Ammount defind by Qty * Rate, on either field being changed)
2 - Quote Details
a - Invoice Number : Integer
b - Item: String
c - Quantity - Number
d - Rate/Cost/Wateva - Currency
e - Amount - Currency (Ammount defind by Qty * Rate, on either field being changed)
AND
f - Comments

If i wanted to take the records from Quote Details and transfer them into the Invoice Details table, how could I do it?

Ive beeing trying the clone method, without success and have also tried to open both forms/tables and using automation from access, add a new record to invoice, but it wont seem to work. Cant find an Add Record feature in VB,

May seem a simple problem, but Im pretty new at VB.
Ive been able to work arround this problem by creating a query on the quotes table and inserting it as the subform, but i physically need to add the records to the invoice details table. At the moment there can be loop holes in the program, esspecially since im making 3 different types of invoices, the one above and 2 others that use the invoice details table,

Any ideas?

Thanks

J

Hi,

Check the attached example.

Hi,
To disable the possibility of adding the same record twice I have amended the example a little.

Hi,
To disable the possibility of adding the same record twice I have amended the example a little.

Ok, I have typed in the code just as in the example but it does not seem to work! something about a syntax error. Ive tried it in all forms posdsible, refered to the help file, ect still it wont work. I have attached a zip file with the part of the database im trying to build and also some screen shots of the errors.

Please help.

J

OK it wont upload, i can e-mail it tho. Send me your e-mail add.

columncounter = 0
columncounter = columncounter + 1
msfg.TextMatrix(columncounter, 0) = txtTID.Text
msfg.TextMatrix(columncounter, 1) = lblTimeIn.Caption
msfg.TextMatrix(columncounter, 2) = lblTimeOut.Caption
msfg.TextMatrix(columncounter, 3) = dt1.Value


msfg.TextMatrix(0, 0) = "Employee No."
msfg.TextMatrix(0, 1) = "Time in"
msfg.TextMatrix(0, 2) = "Time out"
msfg.TextMatrix(0, 3) = "Date"

msfg.ColAlignment(0) = 1
msfg.ColAlignment(1) = 1
msfg.ColAlignment(2) = 1
msfg.ColAlignment(3) = 1

msfg.ColWidth(0) = 1500
msfg.ColWidth(1) = 1500
msfg.ColWidth(2) = 1500
msfg.ColWidth(3) = 1500

well .. i just want to know how to transfer record to another table in access using flexgrid in visual basic 6.0 .. i want a little help here .. kinda reply to my msg ..

tnx in advance c:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.