A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating a new record



 
 
Thread Tools Display Modes
  #1  
Old July 4th, 2004, 11:57 PM
Phil Matish, MCSE
external usenet poster
 
Posts: n/a
Default Creating a new record

I have a form that shows a short list of items. To the left of each
one of these items is a command button, that when pressed, takes you
to a much more detailed form. So you have a short list, and when you
click on a command button next to an item, it brings to you to a large
form with more fields relating to this item.

Anyways, when I use the short form to create a new record, then click
the Command button to add more detailed information, I am taken to the
form, but none of the information I entered into the short form
appears in the large form.

To get the database to act correctly, I have to click OUT of the
record on the short form, then back IN the record, THEN click the
command button for the large form to show the correct information.

Here is the code of the cmd button:

-----
Private Sub cmdOpenFullComputerForm_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmComputerandNetworkSettings"
stLinkCriteria = "[tblComputerInformation_ComputerID]=" &
Me![ComputerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub
-----

I'd appreciate any help you can give me.
P
  #2  
Old July 5th, 2004, 12:13 AM
Dan Artuso
external usenet poster
 
Posts: n/a
Default Creating a new record

Hi,
Try adding this line *before* you open the other form.
Me.Dirty = False

--
HTH
Dan Artuso, Access MVP


"Phil Matish, MCSE" wrote in message m...
I have a form that shows a short list of items. To the left of each
one of these items is a command button, that when pressed, takes you
to a much more detailed form. So you have a short list, and when you
click on a command button next to an item, it brings to you to a large
form with more fields relating to this item.

Anyways, when I use the short form to create a new record, then click
the Command button to add more detailed information, I am taken to the
form, but none of the information I entered into the short form
appears in the large form.

To get the database to act correctly, I have to click OUT of the
record on the short form, then back IN the record, THEN click the
command button for the large form to show the correct information.

Here is the code of the cmd button:

-----
Private Sub cmdOpenFullComputerForm_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmComputerandNetworkSettings"
stLinkCriteria = "[tblComputerInformation_ComputerID]=" &
Me![ComputerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub
-----

I'd appreciate any help you can give me.
P



  #3  
Old July 5th, 2004, 01:31 AM
Mike Painter
external usenet poster
 
Posts: n/a
Default Creating a new record


"Dan Artuso" wrote in message
...
Hi,
Try adding this line *before* you open the other form.
Me.Dirty = False

--
HTH
Dan Artuso, Access MVP

If you have the real estate show the list in a list box or subform and
relate that to a subform related to the list.
Selecting or moving will remove the need for the command buttons and save a
step for the user.
The Northwind database has samples.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Button to print current record only Fatz Using Forms 6 June 17th, 2004 01:58 PM
Problems with record locking Ronny Salomonsen General Discussion 0 June 14th, 2004 09:37 AM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM
Form Does Not Go To New Record Steve New Users 1 May 12th, 2004 03:15 AM
Avoid Creating A Duplicate Record Mark New Users 4 May 11th, 2004 01:52 AM


All times are GMT +1. The time now is 11:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.