473,406 Members | 2,847 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,406 software developers and data experts.

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 2450
cactusdata
214 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

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

Similar topics

2
by: Danny | last post by:
I have a checkbox that looks at the current records fields and is either checked or not based on some of these feilds. But I need to do this each time the user moves to another record, or when the...
3
by: Tim Marshall | last post by:
In A2003, I have a bound continuous form (OK, actually a sub form of an unbound main form, but I don't think that matters here). The record source consists of an Jet SQL statement that returns one...
1
by: Diana | last post by:
I've got a database that has been working successfully for a number of years now. I just added a new item - basically a field that becomes visible depending on another field's value. When I was...
2
by: Rational Repairs | last post by:
I have run into a sudden problem and thought I'd see if anyone else has ran into this. Out of nowhere (sort-of) I am not able to access the OnCurrent event on a subform. I, of course, can write...
10
by: john | last post by:
In a form, when you arrive in a new record, what event is trigerred and in which object? I can't find such an event. I need to reset a value when the user arrives in a next record. Thanks, john
2
by: Salad | last post by:
This was an interesting problem. I open a form, CalledForm. When a record is presented in CalledForm I needed to check the status of something. If the status is met, I needed to present...
5
by: TomK | last post by:
I would like to use the oncurrent event of a subform. The subform class seems to offer onEnter and onExit only, so I tried up to set the event handling routine programatically. It works fine with a...
4
by: Sandra Walsh | last post by:
I have a main form called f_MainTripForm_Admin with a split view. The main form has fields relating to a trip. The main form has 2 sub forms. The subforms have fields related to activities that...
4
Seth Schrock
by: Seth Schrock | last post by:
I have a form that has a combo box in the header that I use to navigate through the records in the form. This combo box uses the DoCmd.SearchForRecord method to go to the selected record. If I...
4
by: MrYoda1 | last post by:
I have a folder that contains all of the student's pictures. I have a short bit of code on the student information Form that will show the picture of the student currently being displayed on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.