473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

populate a field with 'yes' after you enter a date in another field

I can't remember how to populate one field when another field has been updated/populated.

Any help would be greatly appreiciated.
Thanks
Oct 21 '11 #1
5 1913
jimatqsi
1,271 Expert 1GB
Put code in the AfterUpdate event of the date field. Something like
me!field2="Yes"
Oct 21 '11 #2
Thanks that worked. Now if they decided to delete the info (date) in the other field - how can I return the updated field to 'No'. I think I would need to run some kind of query I guess, but how do you build that into an event?
Oct 21 '11 #3
jimatqsi
1,271 Expert 1GB
No, you would use the very same method, but you put a 'No' instead of 'Yes'. Something like
Expand|Select|Wrap|Line Numbers
  1. If isdate(me!Datefieldname) then
  2. me!field2="Yes"
  3. else
  4. me!field2="No"
  5. endif
  6.  
Oct 21 '11 #4
Rabbit
12,516 Expert Mod 8TB
Can I point out there's no need to store a yes/no to show whether or not a date field has a value? You can see that without an additional field. And if needed, it can be calculated on the spot.
Oct 21 '11 #5
NeoPa
32,556 Expert Mod 16PB
As Jim says, you'd need an AfterUpdate event procedure similar to :

Expand|Select|Wrap|Line Numbers
  1. Private Sub Another_Field_AfterUpdate()
  2.     Me.[One Field] = {NewValue}
  3. End Sub
Oct 21 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dave [Hawk-Systems] | last post by:
Have a table with fnumber and number, both text fnumber is a phone number, format "8005551212" number needs to be the same number but in the format "(800) 555-1212" we currently run the...
1
by: laj | last post by:
I'm new . I have a table with student names and than several fields with classes and all have 'yes/no'. Want to query the table to give total for 'yes's in a field. ie how many students (with...
3
by: BlackFireNova | last post by:
This concerns an Access 2002 (XP) database. There are two fields, "Notes" (Memo Field) and "Notes Update" on a form (among others) which I am concerned with here. Problem: I need to be able...
5
by: Randy A. Bohannon | last post by:
I have two fields on a form: GPA and Points. GPA will be entered by the user. I would like Points to be filled automatically depending on the value of GPA. For example, the following code...
1
by: Alienz | last post by:
I'm sure this is easy so if you have a sec pls help me out thx. Let say I have an inventory table and at the end of the month I want to move the info in 1 field (total end of month 1) into...
3
by: euphorica | last post by:
I am making an inventory database. I have a field InventoryNumber where I put a specific code. The code always starts with a particular letter. I would like to fill in another field with...
4
by: rcwoodard | last post by:
Hello all. I have a continuous form that I need to make a field invisible or visible depending on the selection in another field. I have tried using Form_Current() and the following code: ...
2
by: ACF | last post by:
Hello, I'm having two memo fields beside each other for translating purposes. When I scroll down the text in Memo 1 to see what I want to translate, then move to Memo 2 to actually translate the...
1
by: sd_eds | last post by:
I have two fields, "Item" and "Information" in the same table. "Information" contains three items from a seperate table created by a lookup. I would like to substring out the first item and place...
0
by: dowlingm815 | last post by:
I currently importing a csv file with an import specification declaring the field values. one field is a date/time field. when the csv file is imported, it clears the date field with null values....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.