473,506 Members | 17,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re Acuring Data in Forms

Doc
Would you enter this in as an "event procedure" or right in the properties
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 there
are.
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 a
defaultvalue
--
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 want
it
> to recur. example I have different users at different locations.
> When "john" opens the form I would like it to prompt him for his
name, date,
> and department. Then this info would recur through each record that
he > 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 need
the 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 be
entering in
> around 60 records per session
>
>
>



Nov 12 '05 #1
0 1306

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5717
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project...
19
4065
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
1
2897
by: eazycode | last post by:
visit http://www.eazycode.com Introducing a unique product "EazyCode", that can do coding/programming for you at the click of a button, in a matter of seconds. What is EazyCode? EazyCode is...
0
4199
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
6
2554
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
6
408
by: ALthePal | last post by:
Hi, I'm not sure if we are able to or even how to loop through the web forms in a VB.NET project during design time. In MSAccess we are able to go through the database -> forms collection and...
9
2087
by: Bob Alston | last post by:
I am looking for electronic forms software that would integrate well with MS Access. I have a client for whom I built a client database to replace and update one they had that was obsolete and...
19
248006
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
12
11006
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
7220
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.