Search results

  1. G

    Changing a query Dynamically

    Please explain a little further. The code is already being activated by a button. However when the button is clicked I want to see the code in the query window in the SQL Code changed to the following codeSELECT Names.Fname, Names.Lname FROM [Names] WHERE (((Names.Fname)="Manilla")); The...
  2. G

    Changing a query Dynamically

    Thanks for the simplification. I suspected mine was too long. My objective at this time is just to have the SQL code in the SQL view changed to the modified query from the VBA code.
  3. G

    Changing a query Dynamically

    Good Day All, This is my existing query created manually and stored in the query pane:SELECT Names.Fname, Names.Lname FROM [Names]; I want this query to change to this, using VBA code, when I press a button: SELECT Names.Fname, Names.Lname FROM [Names] WHERE (((Names.Fname)="Manilla"))...
  4. G

    Setting a form as a variable

    I followed the video on this link and it provided me with exactly what I needed; that is to pass a text box to a function. Actually the solution example is in not in the text box video but rather in the check box video. Anyways it is working fine. Thank to you and all the others who offered me...
  5. G

    Setting a form as a variable

    I tried both ways by there is still a problem. Here is another observation that might help you to help me. When I use me.PayAmt From the time I enter the . (dot) after me, I get a drop down list that displays all the member which I put on the form along with the access members. However when...
  6. G

    Setting a form as a variable

    The form is not being used as a subform. My ultimate objective is to pass some of the form's text fields as byref arguments to a function where the text fields can be tested for emptiness etc. The function would return a Boolean result. I know that the test can be done directly on the opened...
  7. G

    Setting a form as a variable

    I tried this recommendation: a = PoForm.PayAmt but it throws the same error message:
  8. G

    Setting a form as a variable

    Thanks Mr_Doc_Man for your assistance and guidance. I applied your council but I am still getting a little error message so maybe you can assist further: Here is my new code: Dim PoForm As Form Dim a As String Set PoForm = Forms![Purchase Orders Payments] a =...
  9. G

    Setting a form as a variable

    Good Day All, I want to create a variable of Form type. Then I want to access the members. This code is my effort, But it is not working. Would appreciate some advise Dim PoForm As Form Set PoForm = Forms![Purchase Orders Payments] PoForm.Currency
  10. G

    Using Dsum in a VBA query

    Good Day All, I am seeking to find a way to sum a field in a query generated in VBA. Using DSum works well if the query already exist and is simply called in VBA. However when the query is generate in VBA the DSum function does not work. Here is my code to explain my situation: Private Sub...
  11. G

    Summing a recordset field

    Thanks for your quick response. However it is throwing the following error message: " The field is too small to accept the amount of data you attempted to add. Try inserting or adding less Data"
  12. G

    Summing a recordset field

    Good Day All, In VBA summing a field of a table or query is simple. However I cant figure out a way to sum a field of a record set. I tried the following extract but to no avail: I would be grateful for the solution to by problem: Private Sub Combo7_AfterUpdate() Dim curDatabase As...
  13. G

    creating a temporary report

    ridders. This is exactly what I need. its working fine.
  14. G

    creating a temporary report

    Good Day All, On clicking a button I want a sheet to appear. This sheet is to have some results. I then want to print the sheet and it can be lost after that. Essentially what I want can be done by a Message box, but I want to have a lot of information, so therefore I am hoping to have...
  15. G

    Assigning a Null value to a Control

    Good day All, I have 4 unbounded controls which I would like to empty after using. However assigning Null to them to achieve the emptying objective results in an error message. It was working very well before with exactly the same code but all of a sudden it gives an error message. The error...
  16. G

    coding a value for a dropdown list field

    Good Day All, My field "Categories" acquired its values from a dropdown listbox. However I want, in some cases, to code in a value known to be in the dropdown listbox. Although the values entered in the code corresponds with what is in the dropdown list I am getting an error message which says...
  17. G

    Opening a recordset

    Good Day All, Can someone explain why this code results in no records returned when the table has several records. And if the criteria is excluded all the records are returned. Set rst = curDatabase.OpenRecordset("Cash posting Sub Table", "[mainPostingID] =" & 7)]
  18. G

    Clearing a Table

    Oh. It's too risky to enter the values directly into the tables because a lot of checking and testing has to be performed before entering data into the Journal table. For example it is necessary to ensure that the sum of the debits are equal to the sum of the credits. If a mistake is made it may...
  19. G

    Clearing a Table

    Thanks for your prompt replies and concerns expressed. I am so pleased to provide you my concerns and I am confident you would advise me appropriately. The situation is related to accounting. I am purchasing several different categories of items on one invoice for cash, and want to post the...
  20. G

    Clearing a Table

    I am seeing VBA code to clear an entire table. My subform "CashPosting" which opens in Datasheet view, has record source as a table "Posting". When finished using I want to press a button "Clear" to empty the entire table. Can anyone lend assistance with this problem?
Back
Top Bottom