The structure of the DLast call you've stated looks OK; are you sure that the value you want returned is PartN, when you are already specifying PartN in the criterion of the DLookup? It's like you are looking up a value you already know (unless PartN is a similar value in a different table of course).
The only other thing I can think of off the top of my head is the value in the criterion "[PartN] = " & Forms![frmWHtransTranx]![cboPartN]. I presume from your syntax that the values in your combo box cboPartN are numbers as opposed to strings. If you had string values, you'd need to enclose the criterion value in single quotes, i.e.
"[PartN] = '" & Forms![frmWHtransTranx]![cboPartN] & "'"
DLast, (like most other aggregate functions), will depend on how the table is sorted.
Remember a user may be able to easily change how a table is sorted
This is why it may be better to create a query (of the same table) that is sorted the way you want.
Then DLast *should* return the correct value.
However to be more certain, use something like what mbizup posted.
...or create a date/time stamp field with a default value of: =Now()
But even here you may have to make a distinction between Last "added" record, and last "edited" record.
JeffCoachman
Microsoft Access
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
The only other thing I can think of off the top of my head is the value in the criterion "[PartN] = " & Forms![frmWHtransTranx]![c
"[PartN] = '" & Forms![frmWHtransTranx]![c
HTH