indesisiv
Access - What's that?
- Local time
- Today, 11:03
- Joined
- Jun 13, 2002
- Messages
- 265
I am trying to use DMax to sort out some number issues i have. Here is what i want to do.
I have a field (Text) made up of a 4 letter code (AAAA) then a number.
WHat i want to do is grab the highest number from this. where the code matches what is in a text box.
I have got the following fields:
[Main Table]![Project No] = AAAA### (letter code and then number)
txtType - I set this to be the 4 letter code i want to find the highest number
txtHighestNumber - I want to set this to the highest number.
I am trying to do something like this but it keeps giving me errors. I think i may be over complicating it:
Please Help!!
I have a field (Text) made up of a 4 letter code (AAAA) then a number.
WHat i want to do is grab the highest number from this. where the code matches what is in a text box.
I have got the following fields:
[Main Table]![Project No] = AAAA### (letter code and then number)
txtType - I set this to be the 4 letter code i want to find the highest number
txtHighestNumber - I want to set this to the highest number.
I am trying to do something like this but it keeps giving me errors. I think i may be over complicating it:
Code:
Me.txtHighNumber = DMax(Right("[Main Table]![Project No]", (Len("[Main Table]![Project No]") - 4)), "[Main Table]") ', Left("[Main Table]![Project No]", 4) & "=" & Me.txtType)
Please Help!!