Recent content by Hoa Le

  1. H

    Send Report by email

    Create a form with a button cmdSend and a textbox named txtRecipient. Next, behind the OnClick event of the button, paste this code: '----------------------------- Private Sub cmdSend_Click() Dim strRecipient As String On Error GoTo cmdSend_Click_Err strRecipient = Me.txtRecipient...
  2. H

    how do have a lookup w/o a main form and subform?

    What you need to do is instead of a main form and a subform, make a single form whose record source is a table, tEmployee. Next, in the form's header create a combo box (using Combo box Wizard) whose lookup value is the field EmployeeName of tEmployee. When an employee name is selected, the form...
  3. H

    Replacing Critereia with code

    First, create a form named fUPDATE with a combo box whose lookup value is the subject table's company name; name this combo box txtCompanyName. Next, on the same form create a textbox named txtNewCompanyName and a button named cmdUpdate. Behind the OnClick event of this button, attach...
  4. H

    mutiple Font Colors on a report

    Yes,you can...Here's an example of some code behind the On Print (or On Format) of Detail section of the report: '------------------------ Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) If [Shift] = 1 Then [NameOfControl].ForeColor = "52479" 'Gold ElseIf [Shift] = 2 Then...
  5. H

    random data pulling

    First, copy this function to the module section: ------------- Function Randomizer() As Integer Static AlreadyPicked As Integer If AlreadyPicked = False Then Randomize: AlreadyPicked = True Randomizer = 0 End Function ------------- Next, in the design view of a select query (with the subject...
  6. H

    Group Page Numbers

    Deb - Send me a sample Access db with the subject report and I'll take a look at it.
  7. H

    Coping tables between two Databases

    One alternative method is to backup the database by using the Filecopy statement in Access. Then use the Name statement to give the backup db with a new name. Here's some sample code behind a form with a textbox named [newpath] requiring input of the file to be backed up and a button cmdOK...
Top Bottom