Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Runtime Error 2498

Posted on 2006-07-20
3
Medium Priority
?
953 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

610 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