J
Jacinto Muchine
Hello,
Ive created a query that creates an incremental number
depending on a particular field using IIF Statement.The
query runs well. Now I'd like to run the query after an
update event therefore I, Ive done the following but it
always highlights the "000" and says "expected end of
statement". The code is bellow, can any one help please?
Dim bidDisplay As String
Me.Refresh
If Bid = True Then
BidDisplay = "SELECT First(IIf([Opportunity].[bid],
[industryTypeId]+ Format([Opportunity].
[opportunityId],"000"),"")) AS Bid_Reference FROM Company
INNER JOIN Opportunity ON Company.companyId =
Opportunity.companyId GROUP BY Opportunity.Description,
Opportunity.opportunityId, Opportunity.Bid HAVING
(((Opportunity.opportunityId)=[Forms]![frmCompany]!
[Child14].[Form]![opportunityId]) AND ((Opportunity.Bid)
=Yes))"
BidNumber = bidDisplay
Me.Refresh
End If
Thanks
Jacinto
Ive created a query that creates an incremental number
depending on a particular field using IIF Statement.The
query runs well. Now I'd like to run the query after an
update event therefore I, Ive done the following but it
always highlights the "000" and says "expected end of
statement". The code is bellow, can any one help please?
Dim bidDisplay As String
Me.Refresh
If Bid = True Then
BidDisplay = "SELECT First(IIf([Opportunity].[bid],
[industryTypeId]+ Format([Opportunity].
[opportunityId],"000"),"")) AS Bid_Reference FROM Company
INNER JOIN Opportunity ON Company.companyId =
Opportunity.companyId GROUP BY Opportunity.Description,
Opportunity.opportunityId, Opportunity.Bid HAVING
(((Opportunity.opportunityId)=[Forms]![frmCompany]!
[Child14].[Form]![opportunityId]) AND ((Opportunity.Bid)
=Yes))"
BidNumber = bidDisplay
Me.Refresh
End If
Thanks
Jacinto