473,406 Members | 2,343 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,406 software developers and data experts.

How Can I populate a field only If certain conditions are met?

I want to be able to get my last service date field to be updated when
a workorder is completed, how can i get this done if i require it to
look into the service history subform and confirm first that the equip
ID and the service code match the Equip ID and Service code in the
Equipment service list subform if they match then update the Last
Service done field with the date entered in the Date Delivered field in
the history subform?

otherwise if no service is done or its a new piece of kit then allow me
to enter my own date.

Hope this make sence.

I can send the dbase to anybody willing to help.
any queries contact me on bb*****@hotmail.com

Thanks Guys n' Gals

Oh! for all those guys out there i have had more responce from women so
come on dont let the side down!
Below is what i am tryping in the field i am trying to update.

=IIf([Forms]![Equipment Form]![Equipment History
Subform].[Form]![Service Code]=[Service Code] And [Forms]![Equipment
Form]![Equipment History
Subform].[Form]![EuipID]=[EuipID],[AllowUpdating],[Forms]![Equipment
Form]![Equipment History Subform].[Form]![Date Delivered])
Thanks
Rgds
Dave Mann

Nov 13 '05 #1
2 1761
use a subroutine that does it for you? create a function that contains
all the stuff you need to verify that will return T/F and then if
fOKtoProceed=True, then call your subroutine that does all the
updating. Yes, I know it's probably overkill breaking it up like that,
but it's MUCH easier to debug that way. Get the function working, then
get the sub working and you're in business.
Or have you never programmed in VBA before?

Nov 13 '05 #2
Hi Piet,

Thanks for the reply, i am not that good at Sub Routines. Can i send
you a copy of my Dbase for you to look at?

Rgds
Dave
pi********@hotmail.com wrote:
use a subroutine that does it for you? create a function that contains all the stuff you need to verify that will return T/F and then if
fOKtoProceed=True, then call your subroutine that does all the
updating. Yes, I know it's probably overkill breaking it up like that, but it's MUCH easier to debug that way. Get the function working, then get the sub working and you're in business.
Or have you never programmed in VBA before?


Nov 13 '05 #3

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

Similar topics

2
by: Sergio Otoya | last post by:
Hi all, I need to access the <TR> element where an input text field is hosted. I would like to do this client side as i need to hide the TR based on certain conditions. The HTML is already...
1
by: John Phelan-Cummings | last post by:
I'm not certain if this made the post. Sorry if it's a repeat: Using a Button to take an autonumber from one form to populate another autonumber field on another form. I have a Mainform "A"...
4
by: abCSharp | last post by:
I understand that static variables have app-domain scope. Till the app-domain is in memory, the static variable will be in memory. When are the app-domains unloaded is the question. I have read...
5
by: John A Grandy | last post by:
is it possible to write a vb.net code (intended to run on the client-side) that would invoke an instance of IE, have it download a page from a certain URL, and then pre-populate some of the...
5
by: Uday Deo | last post by:
Hi everyone, I am looping through 4 nested loops and I would like to break in the inner most loop on certain condition and get the control on the 2 nd loop instead of 3rd loop. Here is briefly...
11
by: DSR | last post by:
Help Please... I would like to populate a combo box on a form with a query that compares data from two tables. Any record that is unique in table1 should continue to populate my combobox. The...
39
by: windandwaves | last post by:
Hi Folk I have to store up to eight boolean bits of information about an item in my database. e.g. with restaurant drive-through facility yellow windows
3
by: rn5a | last post by:
A SqlDataReader is populated with the records from a SQL Server 2005 DB table. The records retrieved depends upon 2 conditions (the conditions depend on what a user selects in an ASPX page). If...
2
by: Mufasa | last post by:
I have a page where there's some math being done between a couple of fields. They are autopostback so essentially it won't let them go on if certain conditions aren't met. If the person tabs out of...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.