Search results

  1. R

    Lesson Database

    Or you can, as you requested, use VBA to accomplish the same thing. First create two text controls. Name the first text control txtOwing and the second text control txtLessons. Then place the following code in the forms Current event. Private Sub Form_Current() Dim rs As DAO.Recordset...
  2. R

    Lesson Database

    You can also set up two text Controls on your main form with the following Control Source. This one returns the number of lessons =DCount("LessonID","tblLesson","[ClientID] = " & [ClientID]) This one returns the balance owed by the client =DSum("LessonCost","tblLesson","[ClientID] = " &...
  3. R

    Lesson Database

    Hi, I would set up a totals query that would return both The number of lessons taken and the total amount owing. The following is an SQL statement that would return both. SELECT tblcustomer.ClientID, tblcustomer.ClientName, Count(tbllesson.LessonID) AS CountOfLessonID...
  4. R

    Help with VB Loop

    Hi rotorque, pbaldy and all I was intrigued with pbaldy’s post concerning the Split function. What made it so intriguing was the fact that I had never heard of it. So I decided to look in the help files for help on the Split function. I did not find an example, which for me, made it a...
  5. R

    Help with VB Loop

    Hi Rotorque, Quote: In short where do I put this code on the field or in the modules area or..? I hope you do not find this overkill. Open A new form. Create a List Control and name it fld1 Right click fld1 and select Properties. Click on the Event Tab. Double click the After Update...
  6. R

    Help with VB Loop

    If you want to make sure that all the characters come out capitalized (Upper Case) then use... NewString = NewString & UCase(Mid(str, COUNTER, 1)) & Chr(32) 'Capitalize and add space Have fun Richard
  7. R

    Help with VB Loop

    This works! Public Function fncReturnFirstLetters(str) As String Dim COUNTER As Long Dim Length As Long Dim NewString As String Dim FlagNextWord As Integer 'Initialize variables str = Trim(str) 'Remove leading and trailing spaces FlagNextWord = True...
  8. R

    Open another MDB and path through a parameter

    There is a way you can simulate the opening of a Form in another database superimposing the Form on the database that is presently open. And the 2nd hidden database will not even show. I just tried it and it works great. Open the second database using the Shell Command setting the window...
  9. R

    Copy portion of a string

    I Used this code to parse the number for Width, Height, and Depth and place the results in three controls. Private Sub cmdDoParsing_Click() Dim strWDH As String Dim T As Integer Dim intCharCollected As Integer Dim strChar As String Dim strNumber As String...
  10. R

    VBA to check if table, form, report exists in DB

    Since you already know the name of the form that you are deleting and you are sending the form name to the procedure why not just use... DoCmd.DeleteObject acForm, strFormName And you can omit the rest of the code. To make sure you are not trying to delete the form that is running the...
  11. R

    True/False Value

    Hi tj.b123 You can use the following code where appropriate. Me.ctlName = null and the option group will not have a Yes or No value. Richard
  12. R

    Change Event vs AfterUpdate

    Hi ShredDude! As you said you are having no problem when you re-query the list boxes. And you are having no problem with populating the first list box that shows the properties data. I believe you are trying to automatically select the first property that shows in the properties list box...
  13. R

    Stop dialog box

    Paul R Again I'm not sure if the following will help you as I am not familiar with your complete code but... I was having trouble with "Kill"ing a file and replacing it with another file by the same name. The file was an Access file. I then came up with following so I could accomplish this...
  14. R

    Stop dialog box

    I don't know if I am on the right path to helping you. I've never done any coding in the scope that you require. The only coding I've done is in Access. However, I did try this. To get a complete list of all parameters and arguments required by the Excel SaveAs cmd you might run a macro in a...
  15. R

    Can't move to previous\next record

    Many Welcomes! :) Richard Two cannibals are sitting by the camp fire when one cannibal says to the other... "I can't stand my mother-in-law. The second cannibal remarks. "You think that's bad. You ought to try the potatoes."
  16. R

    Basic question

    Matthew Sorry, I need to make a correction! Yikes! You CANNOT place a Static Variable in the (Declarations) section of your code. However you can use... Option Compare Database Option Explicit Public CountNo As Integer ... and then manipulate the value of CountNo in all procedures used...
  17. R

    Movement within a form

    If you mean another field on the same form by clicking a control then... Private Sub cmdGotoField_Click() Me.ControlName.SetFocus End Sub Hope this helps Richard
  18. R

    Basic question

    Your welcome! Don't Give Up The Computer! We Have Just Begun To Program! Richard
  19. R

    Can't move to previous\next record

    After looking at your code in the txtDateOfCourse On Enter Event... Private Sub txtDateofCourse_Enter() Me.lblDay.Caption = Format(Me.txtDateofCourse, "dddd") Me.txtgroupname = Me.cbogroupproject.Column(1) & " - " & Me.cbovenueID.Column(1) & " " & Me.txtDateofCourse & " " &...
  20. R

    Basic question

    In a procedure you can use a Static variable. A Static variable retains its value as long as the code is running. Call this procedure every time your student clicks no. Place the following code in your cmdNo_Click event Dim dbs As DAO.Database Dim rst As DAO.Recordset Static CountNo...
Back
Top Bottom