Solved

Runtime Error 2498

Posted on 2006-07-20
3
935 Views
Last Modified: 2008-01-09
I am attempting to pull data in to a form from a combo box.  I have created a subform and used a query to pull the information from the combo box.  That part works.  I am trying to have the data change in the subform when you select a different value in the combo box.  I used the following code:

Private Sub Combo0_Change()
DoCmd.Requery [EDIT_QUERY subform]
End Sub

And I get Runtime Error 2498 'An expression you entered is the wrong data type for one of the arguments.'
0
Comment
Question by:suddzy1981
  • 2
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 150 total points
ID: 17150517
Hi suddzy1981,
 DoCmd.Requery "[EDIT_QUERY subform]"


Pete
0
 

Author Comment

by:suddzy1981
ID: 17150817
I am now getting the error 2190 'There is no field named '[EDIT_QUERY subform]' in the current record.'
0
 
LVL 77

Expert Comment

by:peter57r
ID: 17150924
Then that is the case.
You need to check your spelling and also make sure you are specifying the correct control in your main form.
A list of all controls in the main form is shown in the dropdown list at the start of the lower toolbar, when you are in form design view.
For a subform you need to be using the name of the subform container control which could be different from the subform itself.

Pete
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exchange 2016 Databse move 5 54
Exchange 2010 Database wont mount 3 45
SSRS troubles 4 47
Service Catalogue and Data Migration doc 3 40
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question