?
Solved

Runtime Error 2498

Posted on 2006-07-20
3
Medium Priority
?
947 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 600 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

770 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