Freerider
asked on
Query Query
Hi experts,
I have created a Master/Detail form for Customers/Invoices using 2 grid components.
I want to add a button to open another form to show the selected invoice (so it can be edited).
How do I pass the Invoice Number (filedname 'ID') to the other form and display the information?
Any help would be appreciated.
Thanks
Freerider.
I have created a Master/Detail form for Customers/Invoices using 2 grid components.
I want to add a button to open another form to show the selected invoice (so it can be edited).
How do I pass the Invoice Number (filedname 'ID') to the other form and display the information?
Any help would be appreciated.
Thanks
Freerider.
multiple possibilities, but too tired, listening . . .
Why not use a Filter
MyInvoiceNumber.Value:=xxx xx;
MyInvoice.Filtered:=True;
And then show the invoice with the Data Aware Controls as Dbedit .... in the other form.
Application.CreateForm(TMy InvoiceFor m, MyInvoiceForm);
MyInvoiceForm.ShowModal;
Best Regards.
Marcos.
MyInvoiceNumber.Value:=xxx
MyInvoice.Filtered:=True;
And then show the invoice with the Data Aware Controls as Dbedit .... in the other form.
Application.CreateForm(TMy
MyInvoiceForm.ShowModal;
Best Regards.
Marcos.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or add the property InvoiceNumber to your form and assign it before showing it. Then, when you're back, you can validate it or follow the course of action you want.
T-Rex
T-Rex
it goes simpler, later, just waked up
back again, with a cup of coffee :-)
well, i would drop a datasource on your invoiceform and let point the dataset-property to the invoicetable of your mainform, thats all
meikl ;-)
well, i would drop a datasource on your invoiceform and let point the dataset-property to the invoicetable of your mainform, thats all
meikl ;-)
Good Morning kretzschmar, and how's the coffee 4 u?
>and how's the coffee 4 u?
strong, as recommended ;-)
strong, as recommended ;-)
The spice must flow ;-)
ASKER
kretzschmar,
I tried your suggestion and it works (If I use a DBGrid), but I want to use DBEdit components so I can arrange them properly on the form - when I do this I only get the first record.
They *are* pointing to the correct datasource.
What can be wrong??
-Freerider
I tried your suggestion and it works (If I use a DBGrid), but I want to use DBEdit components so I can arrange them properly on the form - when I do this I only get the first record.
They *are* pointing to the correct datasource.
What can be wrong??
-Freerider
>do this I only get the first record.
not really,
the form should display the current record,
which is selected in the childgrid of your mainform
if you want to scroll, within this form,
just place a tdbnavigator on the form,
and connect its datasource-property
to the datasource on the form
if needed, i could code a little sample,
and send it to you (mail-adress required)
hope this helps
meikl ;-)
not really,
the form should display the current record,
which is selected in the childgrid of your mainform
if you want to scroll, within this form,
just place a tdbnavigator on the form,
and connect its datasource-property
to the datasource on the form
if needed, i could code a little sample,
and send it to you (mail-adress required)
hope this helps
meikl ;-)
ASKER
kretzschmar
>not really,
I *do*!!!??
>the form should display the current record,
I have both the DBGrid and the DBEdit fields on the same form. The DBGrid shows the current record as expected.
They are pointing to the same Dataset - I've checked it a hundred times!
A sample would be great:
andrewKEEPYOURSPAMgreaney@ snowboard. com
Thanks.
>not really,
I *do*!!!??
>the form should display the current record,
I have both the DBGrid and the DBEdit fields on the same form. The DBGrid shows the current record as expected.
They are pointing to the same Dataset - I've checked it a hundred times!
A sample would be great:
andrewKEEPYOURSPAMgreaney@
Thanks.
ASKER
I mean DataSource.
one day later, early in the morning, with a cup of coffee :-))
sample in work
meikl ;-)
sample in work
meikl ;-)
sample on the way ;-)
mailing failed :-(
validate your given mail adress
validate your given mail adress
ASKER
Sorry,
did you take out KEEPYOURSPAM ??
did you take out KEEPYOURSPAM ??
no, what to use instead?
where should i now send it instead?
ASKER
OK,
can you send it to:
andrewgreaney@libero.it
Thanks.
can you send it to:
andrewgreaney@libero.it
Thanks.
ASKER
kretzschmar,
I still haven't received your sample.
Did you manage to send it ok?
Freerider.
I still haven't received your sample.
Did you manage to send it ok?
Freerider.
ASKER
kretzschmar,
I still haven't received your sample.
Did you manage to send it ok?
Freerider.
I still haven't received your sample.
Did you manage to send it ok?
Freerider.
>Did you manage to send it ok?
just now :-)
sorry, for delay
meikl ;-)
just now :-)
sorry, for delay
meikl ;-)
ASKER
Thanks meikl,
I got it to work (using an Access database) - sort of. The only problem is when I open the invoice on a new form, I can't edit the data.
I need to check to see which Table I'm accessing, or do I need to set an option for editing somewhere?...
Freerider.
I got it to work (using an Access database) - sort of. The only problem is when I open the invoice on a new form, I can't edit the data.
I need to check to see which Table I'm accessing, or do I need to set an option for editing somewhere?...
Freerider.
ASKER
I eventually used the method suggested by alsantos , but want to split the points as meikl's sample was also very helpfull. How do I split points??
ask at community support for splitting points ;-)