Search results

  1. B

    Assigning new values to blank fields

    Hi all, maybe someone can help me, when I attach a new test database. In this database I left out the import and error handling. Thanks in advance. Regards, Ben
  2. B

    Assigning new values to blank fields

    Hi all, let me describe my problem again. I ask the user to type in a reporting month and a timeperiod variable. There should be no rule what to type in first. The Syntax should be : reporting month : mmyyyy timeperiod : mmyyyy-mmyyyy The logic behind these variables is...
  3. B

    Assigning new values to blank fields

    Sorry guys, that I have confused you. Over the weekend I will rewrite this in a clearer way. Regards, Ben
  4. B

    Assigning new values to blank fields

    Here you go Mihail, the database is attached.
  5. B

    Assigning new values to blank fields

    Hi, the timeperiod and reporting month values are typed in by the user, no calculated fields. At the end it should make sense what the user types in, therefore I have to write a documentation about this for the users. Unfortunately I can't upload the database, cause we only use Access 2010...
  6. B

    Assigning new values to blank fields

    Hello Mihail, I only got a this months table , there are no relations existent. Rgds, Ben
  7. B

    Assigning new values to blank fields

    Sorry guys, the table format looks bad.
  8. B

    Assigning new values to blank fields

    Hi all, I got one months table containing a reporting_month ,timeperiod and an Index column ID with data type Autonumber. Basically I want to search through the table whenever the User types in a new reporting month or timeperiod over the dialogue. Now I want to realize the following options...
  9. B

    Adding items to the right Index record

    Hi all, try to assign a value to the right index. I got one table called months with three columns: Reporting_Month,Forecast_Period, ID I set two indexes on the column ID and Reporting_Month, where the Datatype of ID is AutoNumber. Basically I want to add to the reporting month = 092013 the...
  10. B

    Using If and Case statements

    Hi all, I got a problem with the following statement. Basically I want to check if the Reporting Month already exists in the Months Table. If it exists it should ask the User wheter to overwrite or not. If the User clicks on OK it should delete one record from Months Table if the User clicks...
  11. B

    Replace values by DSUM

    Hi all, I'm not sure if this is possible. I want to replace some values in a TNS_QUERY with DSUM. The error message tells me I have to use an updateable table. How can I avoid to create a query and replace the values directly in the original table TNS? I just group on the original table...
  12. B

    DSUM syntax

    Sorry to bother you again. Bob Larson maybe you can help me again. I slightly changed the query and now it doesn't work again :( Can I use this update command on a query? What have I done wrong? Thanks in advance. DoCmd.RunSQL "Update TNS_QUERY Set Total_Net_Sales = " &...
  13. B

    DSUM syntax

    Thanks all to you guys. Now it works out. Thanks. Regards, Ben
  14. B

    DSUM syntax

    Thanks for the quick response Bob Larson. However I still get an error message regarding the syntax. If I leave the Chr(34) parts out, like: DoCmd.RunSQL "Update TEST_TNS Set Total_Net_Sales = Nz([Total_Net_Sales],0) + DSum('Total_Net_Sales','TEST_TNS',Division = 'COMMON') " & _...
  15. B

    DSUM syntax

    Hello Mihail, thanks for the advice. But I still can't find the error. The immediate window doesn't show anything. If the DSUM part is right, then the outer SQL syntax is wrong ? Regards, Ben
  16. B

    DSUM syntax

    Hi all, I get a syntax error with the following code: Public Sub TEST() DoCmd.RunSQL "Update TEST_TNS Set Total_Net_Sales = "Total_Net_Sales" + DSum("Total_Net_Sales","TEST_TNS","Division = 'Common'") " & _ " Where Division IN ('MC','AK')" End Sub Can anyone help me out here...
  17. B

    Changing records in special cases

    Hi all, I moved on and try now to replace values on a table called TEST_TNS. First I assign a value to x and then want to update the regarding records. Somehow it tells me that there are too few parameters in the CurrentDb.Execute command. Can someone help me out here? Thanks in advance...
  18. B

    Changing records in special cases

    Sorry Paul,David. Basically I want to add the TNS numbers with the record ID = Common to the TNS numbers for record ID = AK and MC. There are no calculated fields TEST_TNS. Later on I want to export the calculated fields at the final table to EXCEL. Regards, Ben
  19. B

    Changing records in special cases

    I guess I can't do it with the query. I have to change the data in the original TEST_TNS table. Can I use these CASE statements in the SQL or do I have to use ADO commands? Any suggestions?
  20. B

    Changing records in special cases

    Hi all, I want to change certain records of a query or table. Here I tried to change this in a query. Something is missing in my code. Can someone help me out ? Thanks in advance. Regards, Ben Public Sub TNS_QUERY() Dim strSQL As String Dim x As Double Dim qdf As QueryDef strSQL = "SELECT...
Back
Top Bottom