If Statement In My Query
- From: SunflowerdBGirl <SunflowerdBGirl@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 16 Oct 2008 14:14:00 -0700
I have a query that I've designed to open a form and just display one
project's information. The user has a form in which they select the project
from a list box that they want to see and then that selection goes to my
query. If that project has not had any information entered against it I need
the form to start a new record using the project selected in my combo box
that prompts the query in the where clause.
SELECT tblCheckbookLog.Date, tblCheckbookLog.Project,
tblCheckbookLog.TransType, tblCheckbookLog.PRNum, tblCheckbookLog.AY,
tblCheckbookLog.PD, tblCheckbookLog.PV, tblCheckbookLog.RE,
tblCheckbookLog.FV, tblCheckbookLog.Obj, tblCheckbookLog.Description,
tblCheckbookLog.Withdrawl, tblCheckbookLog.Deposit,
tblCheckbookLog.AwaitingSigs, tblCheckbookLog.ToRBMD,
tblCheckbookLog.ToPrimavera, tblCheckbookLog.FinalAmt, tblProjects.Office,
tblCheckbookLog.PersonnelName, tblCheckbookLog.Comments,
tblCheckbookLog.VendorName, tblCheckbookLog.TSSElement,
tblCheckbookLog.Category
FROM tblProjects INNER JOIN tblCheckbookLog ON tblProjects.ProjId =
tblCheckbookLog.Project
WHERE (((tblCheckbookLog.Project)=[Forms]![frmProjSelect]![cboProject]));
Any suggestions? I was thinking an If statement but I have no idea how to
say if no records exist create a new one.
.
- Follow-Ups:
- RE: If Statement In My Query
- From: Duane Hookom
- RE: If Statement In My Query
- Prev by Date: RE: Append Additional Data Into New Database
- Next by Date: RE: How to query 2 tables and then perform a wildcard search using a 3
- Previous by thread: Append Additional Data Into New Database
- Next by thread: RE: If Statement In My Query
- Index(es):
Relevant Pages
|