ang3la


i using vb express 2005

my invoice system got some tables

Customer

CustomerID

Name

Address

Statement (form statement)

StatementID

CustomerID

Date

itemno

Desription

Debit

Credit

invoice ( form invoice)

InvoiceID

invoice no ---(currently in textbox) need send to ---> itemno in statement

Invoice_date (currently in date timepicker)---need send to ---> date in statement

CustomerID

invoicedetails ( form invoice)

InvoicedetailsID

InvoiceID

quantity

price

total (currently in textbox)---need send to ---> Debit in statement

i need to send those 3 data from invoice to statement .

how to do it use sql statement



Re: Help ! import details

js06


Are you trying to run a statement report on all the records

or Generate individual statements for all customers

What i mean is do you want to have a report showing all customer invoice totals in a list

Example:

customer invoice# invoice date total

john smith 100 9-28-07 500.00

jack smith 120 9-30-07 300.00

something like this

or do you want a statement that is generated to mail to a customer

And create one for every customer

Example:

Statement# 1

Customer john smith

invoice# 100

Invoice Date 9-28-07

Total 500.00

more details please

be specific

Now that i look at it again are you just trying to print out a single statement at the time of an order

I think my brain must be overloaded because every time i look at it i think it's something else

Maybe i need a break

Anyway let me know what you are trying to accomplish






Re: Help ! import details

ang3la

sorry for confusing and not mentioning in detials

actually i got 2 form - invoice and statement form

so, when i key in all the details for invoice form ,it will auto calculate the total and everything for me

then , finally beside that, i need it to transfer the calculate details to the statement form without me keying it again.

therefore , the statement will receive the invoice no, total--> into debit column, and date into date column inside statement. all the data will goes to the same customer that i create invoice for that customer.






Re: Help ! import details

js06

Ok i think i understand

What you can do is to create some public variables in a module to hold the data from the invoice form and then transfer the data to the statement form.

in your module you can create a public variable with something like this

Public invtotal as Double = 0.0

in your invoice code you just say Integer.TryParse(me.totaltextbox.Text, invtotal)

i haven't tried tryparse with a public variable but i imagine it should work the same

Then you will need to add the variable data to your statement form






Re: Help ! import details

ang3la

what should i do when i update the data in invoice, and it will also update the data in statement form





Re: Help ! import details

js06

I'm not sure i follow you exactly on this one.

When you say update do you mean after you type in the data in the textboxes or after you update the database table

Either way you just need to use an event to put the data into your variables and then get that data into the statement form.

either use a button to send the data or another event tied to your invoice boxes or invoice form

let's say you use a button

Basically it would be like this

type the data in the invoice boxes

click the button

button code ---------

Integer.TryParse(me.totaltextbox.Text, invtotal)

statementform.totaltextbox.text = invtotal

That's basically it

add all your data like this in one event

Keep in mind that i am assuming you have a details view of your statement table in the statement form