To use
GingerR's strategy, there are several ways to approach this. For example, use your normal form, and then add three unbound text or combo boxes. Then you can...
- Use the
OnCurrent event procedure
- If a full record is displayed on the form, then you can "hide" the unbound text or combo boxes, or display ""
For example, if your primary key, called MyPrimaryKey in this example, is numeric...
If Nz(Me.MyPrimaryKey, 0) Then
Me.FirstUnboundCombo = ""
Me.SecondUnboundText.Visible = False
Else
Me.SecondUnboundText.Visible = True
End If
...Next
DoCmd, GotoRecord , , acNewRec
Is adding a new record. This may be why you are creating two records. A "Refresh" command is...
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
You can use the wizard for the command button to generate the code and place a "Refresh" button on your form.
As I stated, you need to use the Primary key and "edit" the current record. There are a zillion ways to do this. Perhaps this may work instead.
Code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
With Form
.orderId = int1
.ProductId = 1
.Qunatity = 1
.etc etc
End with
By the way, you seem to be quickly advancing well beyond the "intermediate" level of Access. Well done.
Richard