469,903 Members | 1,803 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

OnCurrent Event

27
Hi again...didn't think i'd be back so soon !.
I have a quick question regarding VBA for a Form. I have the code below in the OnCurrent event of a form i'm using but i'd also like to add another piece of code which simply requeries a combo box but i get an error saying something about an ambiguous name ?

The following code works fine

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. Me.txtLast.DefaultValue = Format(Nz(DMax("CalibrationDone", "tbl_CalibrationRecords", "EquipID = '" & Me!EquipID & "'"), Date), "\#mm\/dd\/yyyy\#")
  3.  
  4. End Sub
But when i add the code below i get the error. Would anyone know what i'm doing wrong ?

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. Me.Combo52.Requery
  3.  
  4. End Sub
May 29 '20 #1

✓ answered by cactusdata

Include that code line in the existing subfunction.
Don't attempt to create yet a Form_Current() event.

2 2039
cactusdata
188 Expert 128KB
Include that code line in the existing subfunction.
Don't attempt to create yet a Form_Current() event.
May 29 '20 #2
Pol53
27
Thanks it's ok now. I tried that initially but it didn't work...probably something else i did that caused it. Cheers for your help
May 29 '20 #3

Post your reply

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

Similar topics

1 post views Thread by Diana | last post: by
2 posts views Thread by Rational Repairs | last post: by
10 posts views Thread by john | last post: by
2 posts views Thread by Salad | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.