Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 12th, 2005, 10:57 PM
Larry Turner
Guest
 
Posts: n/a
Default Forms problem

I have a form that holds line items in an Order entry project. If the
order exist all the line items are changeable. If I want to add a line
item it goes to data entry and the item is added, but all I can change
now is the record that I added. How do I get the Form out of Data
Entry and be able to see all records including the added one. It's
like my query for the form is gone.
Thanks in advance...
  #2  
Old November 12th, 2005, 10:57 PM
Mike Preston
Guest
 
Posts: n/a
Default Re: Forms problem

On 21 Apr 2004 09:26:27 -0700, lturner@mii-inc.com (Larry Turner)
wrote:
[color=blue]
>I have a form that holds line items in an Order entry project. If the
>order exist all the line items are changeable. If I want to add a line
>item it goes to data entry and the item is added, but all I can change
>now is the record that I added. How do I get the Form out of Data
>Entry and be able to see all records including the added one. It's
>like my query for the form is gone.[/color]

You don't explain how the form "goes to data entry". Is it a
continuous form? If not, how is the form being "switched" to data
entry?

In any event, it sounds like you need to requery the form.

How and where you do that depends on how you go to "data entry" now.

mike
  #3  
Old November 12th, 2005, 10:57 PM
Larry Turner
Guest
 
Posts: n/a
Default Re: Forms problem



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!
  #4  
Old November 12th, 2005, 10:57 PM
Mike Preston
Guest
 
Posts: n/a
Default Re: Forms problem

On 21 Apr 2004 20:47:34 GMT, Larry Turner <lturner@mii-inc.com> wrote:
[color=blue]
>
>
>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.[/color]

How do you "do a requery"? [Be patient, we will get there.]

mike
  #5  
Old November 12th, 2005, 10:57 PM
Bob Quintal
Guest
 
Posts: n/a
Default Re: Forms problem

Instead of DoCmd.RunCommand acCmdDataEntry, what you want is to
docmd.GoToRecord ,,acNewRec

That will move you to the new record, but you can scroll through
the existing ones.


Larry Turner <lturner@mii-inc.com> wrote in
news:4086dde5$0$204$75868355@news.frii.net:
[color=blue]
>
>
> 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![/color]

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles