of the combo box under event / afterupdate. I kept getting an error message
that it could not find the Macro "Me!", when I tried it as an event
procedure it did not understand the argument. I'm sure its me doing
something wrong but I don't know what.
Thanks Doc
----- Original Message -----
From: "Arno R" <ar****************@tiscali.nl>
Newsgroups: comp.databases.ms-access
Sent: Saturday, September 27, 2003 4:25 AM
Subject: Re: Auto complete forms
Doc,
Maybe I wasn't explicit enough .. It's really very simple though.
You need code like I gave you in the AfterUpdate-event *of each combo or field* that you would like to set a defaultvalue for.
So when you have two controls in your form e.g. Field 1 and Combo2 you need the code:
Sub Field1_AfterUpdate()
Me!Field1.DefaultValue=Me!Field1
end sub
Sub Combo2_AfterUpdate()
Me!Combo2.DefaultValue=Me!Combo2
end sub
The advantage of this approach is that *every* time another value is entered this new value behaves as the defaultvalue.
You can use this on any form where there are more recurring values to be entered.
--
Hope this helps
Arno R
"Doc" <do*******@hotmailremove.com> schreef in bericht
news:l7******************@bignews3.bellsouth.net.. .I could not get that code to work maybe I didn't enter it right.
"Arno R" <ar****************@tiscali.nl> wrote in message
news:bk**********@reader1.tiscali.nl...Hi Doc,
You could set the defaultvalue of some comboboxes or fields at runtime. So when the form opens there are no defaultvalues but when the first
record is entered then thereare.
Put this in the AfterUpdate-Event:
Me!ComboOrField.Defaultvalue=Me!ComboOrField.Value
You could also set
Me!ComboOrField.TabStop=false to prevent users tabbing to the
fields once they have adefaultvalue
--
Hope this helps
Arno R
"Doc" <do*******@hotmail.com> schreef in bericht
news:Hb*****************@bignews4.bellsouth.net...>
> The question is. I have a form that half the data is the same and I wantit> to recur. example I have different users at different locations.name, date,
> When "john" opens the form I would like it to prompt him for his> and department. Then this info would recur through each record thathe > enters while this form is open. Then he could close the form and
Susie could> do the same. I can set up defaults in forms to do this but I needthe these> to be chosen from drop down menus. So that the data is the same each
time.> There are multiple users for this data base. Each user would beentering in> around 60 records per session
>
>
>