Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

How populate field on a form with DLast

I have a main form that has a text box which I'd like to populate with a DLast when the form opens.  I've put the following in both the onopen and onload event of the form but get an error...

"You can't assign a value to this object".

Here's my code.  What's wrong with it?

Me.txtdbVersionN = DLast("dbVersion", "tblDatabaseVersion")

--Steve
0
SteveL13
Asked:
SteveL13
  • 2
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
how about using DMax instead


Me.txtdbVersionN = DMax("dbVersion", "tblDatabaseVersion")
0
 
SteveL13Author Commented:
Am getting the same error message with DMax.  ??
0
 
Rey Obrero (Capricorn1)Commented:
check if the textbox  "txtdbVersionN" is bound to a field in a table, make the textbox Unbound.
0
 
SteveL13Author Commented:
Sorry.  DMax DID work.  I just types it wrong.  Thanks as always.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now