Recent content by Simon C

  1. S

    Opening a form with a control button

    Your post implies that as well as your main table of people you will have two other tables, one for members and one for donors. Have you considered having a single table of people, with a field classifying them as, for example, 'members' or 'donors', and then to record donations have a table...
  2. S

    selecting correct record

    Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmProducts" stLinkCriteria = "[ProductID]=" & Me![Child78]![ProductID] DoCmd.OpenForm stDocName, , , stLinkCriteria 'Products' being the form you want to open, 'Child78 being the subform on the current form...
  3. S

    lookup in access

    First question I would ask is why do you have two tables? To do a lookup you would need the second table to have unique values in the currency field. If your first table is one of unique currencies then why not combine the two tables? However if the currency field in the first table does not...
  4. S

    database object in code

    You need to declare the database as a DAO object: Dim dbs As DAO.Database Or you can use what you were using and explicity declare, for example, recordset objects as Dim rst As DAO.Recordset Hope that helps.
  5. S

    Importing files - prompt for file name

    Attach the following event procedure to the On Click event of a button called 'Import_File'. Private Sub Import_File_Click() On Error GoTo Err_Import_File_Click Dim strFile_Path As String Dim strTable As String 'Prompt user for file path strFile_Path = InputBox("Please enter file path")...
  6. S

    table modification in VB

    Try the following: Public Sub Alter_Table() Dim db As Database Dim tdf As TableDef Dim fld As Field Set db = CurrentDb() Set tdf = db.TableDefs("NameOfTable") 'Where NameOfField is the name of the field whose property you are changing tdf.Fields("NameOfField").ValidationRule = ">0"...
Top Bottom