Topic: Having problems

Hi all,

As you will gather i'm a little new to this.
I'm writing a program that basically has 3 main tables, address, jobfiles, stock.
The stockfile collects data from address and stock to produce invoices.
The jobfile stores an invoice address and delivery address selected from the address table.
For the life of me i can't seem to copy an address file into the jobfile however i code it.
I can select the address id but loose the jobfile id, or the other way round, i've tried everything.
Now i'm sure there is a variable that stores an id after focus but no idea what it is, if i could get the whole sql command in one line then it would work.
Then all i will need is a command in the script to refresh the jobfile form.
Hope i have explained this clearly, and again many thanks in advance.

John

Re: Having problems

Hi John,
If you attach your project (zipped up without the actual .exe file) then I'm sure someone will be able to give you a steer.
Derek.

Re: Having problems

Thanks Derek.

Can do that, but this is the problem.

SQLExecute ('update temp set var1 = (select address.short from address where address.id = ('+jobfiles.Combobox1.sqlvalue+')) ');

SQLExecute ('update jobs set cust_short = (select var1 from temp where var10 = jobs.id ) ');

Here i'm just updating one line, putting the address id into a temp file, this updates jobs, but nulls all the columns except the columns i'm updating.

Re: Having problems

I can't comprehend what you really want to do but it is attainable in my perception. We just need a little bit more details on your table and to where do you execute that queries. As derek said, it is better for you to upload at least part of your program if you can't upload all of it. Just have copy of the form and tables to where you want to execute that queries in a new project.

brian