473,385 Members | 1,325 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.

Set form default value to most recent field of certain combination

Hi, in my AssemblyParts table, I have fields, "Part A Serial #", "Part B Serial #", "Date Tested", and "Other Info".

For my form, I have the entries: "Part A Serial #:" "Part B Serial #:" "Date Tested:" "Other Info:"

I'm having trouble setting "Date Tested" to autofill to the most recent "Date Tested" of the specific serial # combination I enter in my form, corresponding to the data I have in my AssemblyParts table. Any help would be appreciated.

EDIT:
As for data: my table is called "CalibrationData". Within it, I have fields, "partAserialNumber", "partBserialNumber", "DateTested", and "ImpactForce". For this table, there are numerous combinations of partA and partB, and Impact Force calculations could be made multiple times a week for the same combination of partA and partB. Thus, in my bounded form, what I envision is that as I enter in partA's serial number, and partB's serial number, "Date Tested" will autofill to the combination's most recent date stored in the "CalibrationData" table
Jul 21 '15 #1
1 1034
jforbes
1,107 Expert 1GB
You could use a DMax for this. Create a Unbounded field and set the ControlSource to something like this:
Expand|Select|Wrap|Line Numbers
  1. =DMax("DateTested", "CalibrationData", "partAserialNumber='" & [partAserialNumber] & "' AND partBserialNumber='" & [partBserialNumber] & "'")
You may need to add a Recalc in the OnCurrent event for DateTested field, as well as the OnChange event of the SerialNumber fields.
Jul 22 '15 #2

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

Similar topics

1
by: garyusenet | last post by:
Using VB Express and SQL. I have an sql database. what function gives me todays date and time? and do i enter it in the 'default' property for the column in the database? i've tried now()...
0
by: gary b | last post by:
My forehead is sore from beating it against the wall. Can anyone help? I've started drinking again because of this problem! Setup: ContestantTbl = table ('one' side) HorseTbl = table ...
4
by: erick-flores | last post by:
Hello I am trying to setup a default value for a field in a form. The field is a text box. I need to setup the default value to: 0.000. And whenever the user is trying to enter a value for this...
1
by: Olaf Rabbachin | last post by:
Hi folks, I'm looking for a way of retrieving the default-value of a table's field within an Access 2003 MDB. Any hints on how to accomplish this from ASP.Net? Thanks, Olaf -- My .02:...
2
rsmccli
by: rsmccli | last post by:
Is there any benefit to having 0 instead of null as a default value for combobox/lookup fields? Just wondering because I find the default 0s annoying and am thinking about going through and deleting...
1
by: klausdh | last post by:
Hi all, I am just about to migrate a database from mdb to adp format - and experienced a real difficulty in retrieving a table field's default value by VBA code (using the ADODB 2.8 Library). In...
3
by: viki1967 | last post by:
Hi all. I have this: <input type="text" name="agg" size="30" value="---" readonly> <select size="1" name="provv" onchange="var cc = this.options.value;...
6
by: Mihail | last post by:
Hello ! I have a form, (in a FE database) bound to a table (in a BE). You understand that is, in fact, a linked table, because I am in FE. In this form I have some labels (for bounded controls)...
2
wasseypurian
by: wasseypurian | last post by:
I have two forms in my database 1. Product Form 2. Product Extraneous_Details Form When the user fills the 'Product Form' and clicks on save button then I have build the macro which saves the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.