Solved

Runtime Error 2498

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Read about achieving the basic levels of HRIS security in the workplace.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now