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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

default value previous record



 
 
Thread Tools Display Modes
  #1  
Old February 4th, 2005, 11:57 PM
Stacy
external usenet poster
 
Posts: n/a
Default default value previous record

I woulds appreciate any help on the following.
Combo box for Customer Names. Would like the form to autofill with the same
field from the previous record.
I have typed everything I can think of in the default value on the properties.
Thanks
Stacy
  #2  
Old February 5th, 2005, 12:23 AM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

If this is a field's Default Value (design view of table), no such
capability.

If this is a control's Default Value (design view of form), then use code
similar to this on the AfterUpdate event of the combo box:

Private Sub ComboBoxName_AfterUpdate()
Me.ComboBoxName.DefaultValue = """" & Me.ComboBoxName.Value & """"
End Sub

Note that this will work for the second and subsequent entries once the form
has been opened. The next time you open the form, the first record will not
have the "correct" default value until you enter the first record of that
form's use.
--

Ken Snell
MS ACCESS MVP


"Stacy" wrote in message
...
I woulds appreciate any help on the following.
Combo box for Customer Names. Would like the form to autofill with the
same
field from the previous record.
I have typed everything I can think of in the default value on the
properties.
Thanks
Stacy



 




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
Get Value from Previous Record Bernie Using Forms 4 September 10th, 2004 06:11 PM
Copy value from previous record Ian Using Forms 3 August 29th, 2004 03:01 PM
Default message coming up when I try to delete a record in a form Larnoc New Users 4 August 8th, 2004 11:33 PM
Go to previous record Ronnie Using Forms 2 July 11th, 2004 08:30 PM


All times are GMT +1. The time now is 09:51 AM.


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