Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to open record in FRM view but if no match returns blank screen

Status
Not open for further replies.

RobertIngles

Technical User
Jan 20, 2011
113
CA
I have a control on my switchboard that activates a user input parameter query - popup asks the user to enter the parameter value. If the user input parameter value matches the associated record in the TBLLaptop the related form opens with the information in edit mode however if there is no match then Access returns a blank screen. On a parameter mismatch I would like the form to open in add mode and I think I need to run a

DoCmd.OpenForm "FRMCreateNewLaptopUseProfile", , , , acFormAdd

but I have no idea where to place the code when using a popup parameter request. Do I need to use a sql statement to accomplish my goal? If so, maybe someone could give me an example of the code or let me know what to search for as I have no experience with sql.

Thanks
 
Never mind, changed the allow additions property to yes and now it opens the form in add mode.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top