Urgent Pleas! How Do I Create A Form To Add Further Records To An Invoice (1 Viewer)

hullstorage

Registered User.
Local time
Today, 06:44
Joined
Jul 18, 2007
Messages
213
Hi all, I am using Access 2010

I have uploaded database to show where i am at, but I am now stuck on the following:

As you will see I have a form called Main which dispays all active ( uninvoiced ) customers which has a list box that when selected show the Invoice.

What I want is when the "ViewSimpleInvoice Frm" is displayed I can click on the "Add Another Booking" button this then opens another form to add another record to the selected invoice.

I am open to any other suggestions of completing this task.

Thanks

Simon
 

Attachments

  • New Build 2011.zip
    73.2 KB · Views: 85

smig

Registered User.
Local time
Today, 08:44
Joined
Nov 25, 2009
Messages
2,209
when you open the new form use it's OpenArgs to send it the InvoiceID.
this will enable your new form to save the new record to the correct invoice.
 

hullstorage

Registered User.
Local time
Today, 06:44
Joined
Jul 18, 2007
Messages
213
when you open the new form use it's OpenArgs to send it the InvoiceID.
this will enable your new form to save the new record to the correct invoice.

sorry, can you specify a bit more info never used the openargs before?
thanks
 

smig

Registered User.
Local time
Today, 08:44
Joined
Nov 25, 2009
Messages
2,209
when you open a form you use a code like:
docmd.OpenForm "FormName"....
at the end of this code you can put the OpenArgs

look at the .OpenForm help for more info
 

missinglinq

AWF VIP
Local time
Today, 02:44
Joined
Jun 20, 2003
Messages
6,423
Here's an example:

In the original, sending form
Code:
Private Sub OpenSecondaryForm_Click()
 If Len(Nz(Me.RecordID, "")) > 0 Then
  DoCmd.OpenForm "SecondaryForm", , , , , , Me.RecordID
 Else
  MsgBox "There is no Current RecordID!"
 End If
End Sub
In the form to be opened
Code:
Private Sub Form_Load()
 If Len(Nz(Me.OpenArgs, "")) > 0 Then
  DoCmd.GoToRecord , , acNewRec
  Me.RecordID = Me.OpenArgs
 End If
End Sub
Linq ;0)>
 

hullstorage

Registered User.
Local time
Today, 06:44
Joined
Jul 18, 2007
Messages
213
getting runtime error
you cant assign a value to this object
??
 

smig

Registered User.
Local time
Today, 08:44
Joined
Nov 25, 2009
Messages
2,209
this won't help much.

what did you try?
 

Users who are viewing this thread

Top Bottom