By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Using a From to Open a form containing a Paramter Query

P: 2
Hi Guys,

This is my first post so bear with me :)

I am running Access 2003 and am still feeling my way around it.

I have a form (FORM_IDL) that uses a combobox (cboIDA) which uses a query as its source. Now when the user enters an IDA value thats not in the list of the combobox I want the user to be able to choose whether they add the new IDA into the Database or try entering another IDA.

I have the following code in the notinlistevent:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboIDA_NotInList(NewData As String, Response As Integer)
  2.     Dim msgresponse As Single
  3.  
  4.     Response = acDataErrContinue
  5.  
  6.     msgresponse = MsgBox("The IDA you entered doesnt exist." & vbCrLf & _
  7.                   "Would you like to create a new IDA?", vbYesNo)
  8.  
  9.     If msgresponse = vbNo Then
  10.         MsgBox "Please choose or enter another IDA"
  11.         cboIDA = ""
  12.         cboIDA.SetFocus
  13.     Else
  14.         DoCmd.OpenForm Form_frmNEWIDA, acNormal, , , acFormAdd, , Form_frmNEWIDA.RecordSource = "idaregion_query"
  15.  
  16.     End If
As you can see, if the user wants to enter a new ida, I want a form (FORM_IDA) to be opened allowing the user to enter the new IDA's criteria, however this form has some bound fields that use a paramter query, and whenever i use FORM_IDL to open FORM_IDA, i get a dialog box asking me to enter the parameter in the forms underlying query.

Does anyone know how I can get the form to open without the dialog box?

Thanks
Aug 1 '07 #1
Share this Question
Share on Google+
2 Replies


P: 2
Solved the problem. Looks like a little typo threw a spanner in the works :)
Aug 1 '07 #2

NeoPa
Expert Mod 15k+
P: 31,494
Solved the problem. Looks like a little typo threw a spanner in the works :)
Thanks for letting us know Garx.
Sometimes just formulating the question can help you see the problem better ;)
Aug 1 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.