Ошибка доступа к SQL - PullRequest
0 голосов
/ 15 мая 2018

Когда я пытаюсь получить доступ к базе данных для моей формы доступа, я получаю одно и то же сообщение об ошибке;

Неверный брекетинг форм имени! [Дата чтения счетчика> Ящик] .tbxCurrent]

Я попытался удалить и добавить скобки и заменил их на 'но не повезло.

SELECT 0.3 AS CurrWaterRate, 
       forms![Meter Reading Date Box].tbxNewGasRate AS CurrGasRate, 
       forms![Meter Reading Date Box].tbxNewElecRate AS CurrElecRate,
       4.65 AS BaseElec, 
       IIf([RV]=True,0,3) AS BaseGas, 
       IIf([RV]=True,0,9) AS Sewer, 
       IIf([RV]=True,0,13.35) AS Garbage, 
       [Current Month Utilities].*, 
       [Previous Month Utilities].*, 
       [Current Month Utilities]!KWHReading-
            [Previous Month Utilities]!KWHReading AS BillKWH, 
       [Current Month Utilities]!GasReading-
            [Previous Month Utilities]!GasReading AS BillGas, 
       [Current Month Utilities]!WaterReading-
            [Previous Month Utilities]!WaterReading AS BillWater,
       [Customer Maintenance].*, 
       ([BillKWH]*[CurrElecRate]) AS DueKWH, 
       IIf([RV]=True,0, 
           IIf([Electric]=True,0, 
                IIf([BillGas]>10,6.5+([BillGas]-
                     10)*[CurrGasRate],6.5))) AS DueGas, 
       IIf([RV]=True,0,
           IIf([BillWater]<3,8,([BillWater]-3)*0.3+8)) AS DueWat, 
       IIf([RV]=True,0,
           IIf([Electric]=True,0,3)) AS GasSurcharge, 
       (([DueWat]+[DueKWH]+[DueGas]+[GasSurcharge]+[Sewer]+
         [Garbage]+[BaseElec]+[BaseGas])*0.0825) AS Taxable, 
       [LotRent]+[TrailRent]+[DueWat]+[DueKWH]+[DueGas]+
       [GasSurcharge]+[Garbage]+[Sewer]+[Taxable]+[BaseElec]+
       [LateFee] AS TotalDue, 
       ([TotalDue]+[PastDue]-[Credit]) AS GrandTotal, 
       [FName] & " " & [LName] AS Name
FROM ([Customer Maintenance] 
INNER JOIN [Current Month Utilities] 
    ON [Customer Maintenance].AccountNo=[Current Month Utilities].AccountNo) 
INNER JOIN [Previous Month Utilities] 
    ON [Customer Maintenance].AccountNo=[Previous Month Utilities].AccountNo;
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...