Solved

Runtime Error 2498

Posted on 2006-07-20
3
945 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 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

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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…
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…

729 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