Below is the code that sends the form into data entry mode.
This is for adding a new line. Once this code executes the form is then
in data entry mode. All I can now see after the record is added is that
record. the other lines that are on the order are not there anymore.
If Me!LineTC = "A" Then
DoCmd.RunCommand acCmdDataEntry
Me!UbLineNumber = 5000
Me!LineNumber = 5000
Me!PartNumber = "Add Part Here"
Me!PartDescription = Null
Me!SpcCode = Null
Me!Price = 0
Me!Weight = 0
Me!Quantity = 1
Me!QuoteID = Forms!QuoteForm!QuoteID
Me!UbLineNumber.SetFocus
End If
This is for lines that already exist.
This work fine and the query stays for the order entry number.
If LineTC = "C" Or LineTC = "D" Then
Me!UbLineNumber = Null
Me!UbLineNumber.SetFocus
End If
I do a requery after the line is added and the record navigation number
just shows 1 record which is the record just added. If I close this form
and open it back up the records added is there along with all the
existing line items. It is a single form by the way and is Access 2000.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!