Saving data in Access table using VB ?

B

Bauhaus

I have a form with a button and if you click the button, a list of invoices
are generated and saved in the table 'Invoice'.
Problem is, the data isnt saved :(

Here's my code:

Private Sub Knop0_Click()

Dim Invoicenr As Long
Dim Invoicedate As Date

stdocname = "Invoice"
DoCmd.OpenTable stdocname, acViewNormal, acAd

Invoicenr = 111111
Invoicedate = Now

DoCmd.Save acTable, stdocname

End Sub

What am I doing wrong ?
 

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