From table to form to table

G

Guest

H
I was hoping if there was someone out there who could help me
I have two tables, one named invoices and one named customers, and a form named invoices
What I am trying to do is get the cutomer data onto the invoice form and then make it stick to the invoice table
What I have managed is to look up customers (from customers table) with a combo box and make the additional info (address .......) appear in text boxes on the form (with " [combo box].column(3) " in "Control Source" ) and it works great on the invoice form but the only field that gets to the invoice table is the combo box it self
I was thinking I might be able to use the "Default Value" but not working yet.
Can anybody help please ?
 
K

Ken Snell

You need to bind your form to the Invoice table (or to a query that is based
on the Invoice table). The form wizard will help you set up such a form
fairly easily. Try that option and see if it is helpful for you. Post back
with additional questions as needed.

--
Ken Snell
<MS ACCESS MVP>

gauji said:
Hi
I was hoping if there was someone out there who could help me '
I have two tables, one named invoices and one named customers, and a form named invoices.
What I am trying to do is get the cutomer data onto the invoice form and
then make it stick to the invoice table.
What I have managed is to look up customers (from customers table) with a
combo box and make the additional info (address .......) appear in text
boxes on the form (with " [combo box].column(3) " in "Control Source" ) and
it works great on the invoice form but the only field that gets to the
invoice table is the combo box it self.
 
G

Guest

Thanks
I figured this out at last
I created a query from the " row source " on the combo box
then used "After update" on the combo box to get the values to th
text boxes (like this "Me.textboxname.Value = Me.comboname.Column(2)" )
so the "control source" of the text boxes can be set to the table and every thing gets updated
My first coding ever
But now I am thinking couln´t I use some kind of coding to update yet a nother text box with the current date
At the same time.
 
K

Ken Snell

If you want to set the default value of a textbox to the current date, you
can use
=Date()
as the expression for the default value.

If you want the textbox to have the current date as its value (and not have
the textbox be bound to a field), use the above expression as the control
source of that textbox.

If you want to write the current date into a textbox (similar to what you're
doing in the AfterUpdate code), add this line of code to your code:
Me.DateTextBoxName.Value = Date()


--
Ken Snell
<MS ACCESS MVP>

gauji said:
Thanks
I figured this out at last.
I created a query from the " row source " on the combo box,
then used "After update" on the combo box to get the values to the
text boxes (like this "Me.textboxname.Value = Me.comboname.Column(2)" )
so the "control source" of the text boxes can be set to the table and every thing gets updated.
My first coding ever.
But now I am thinking couln´t I use some kind of coding to update yet a
nother text box with the current date ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top