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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Query and Null Value

Status
Not open for further replies.

Arob

Technical User
Jul 25, 2001
55
0
0
US
I have a very simple select query which a user types in a record number, the query searches the database and if the record number exists, it pulls up a form that has data pertaining to this record number. However my problem is if there is no record number in the database, I would like a different form to open allowing them to enter the information on this record number. Does anyone have any suggestions.

Thanks

Below is my SQL if this helps
SELECT [Work Assignments].CID, [Work Assignments].[assignment#], [Work Assignments].[Quote/Policy], [Work Assignments].NameInsured, [Work Assignments].City, [Work Assignments].StateNo, [Work Assignments].RLB, [Work Assignments].specialinstructions, [Work Assignments].surveycomplete
FROM [Work Assignments]
GROUP BY [Work Assignments].CID, [Work Assignments].[assignment#], [Work Assignments].[Quote/Policy], [Work Assignments].NameInsured, [Work Assignments].City, [Work Assignments].StateNo, [Work Assignments].RLB, [Work Assignments].specialinstructions, [Work Assignments].surveycomplete
HAVING ((([Work Assignments].CID)=[Forms]![frmcidnumberscreen]![CIDnumber]) AND (([Work Assignments].surveycomplete)=False));
 
I think you would be better off in Access Forms Forum702. That being said, you say that if a record is found, a form is opened, please post the code for this.
 
I finally figured it out. All I needed was to have the query show a value instead of being null. Once I was able to do this the rest was easy

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top