Search results

  1. A

    Invalid operaton while appending field property

    I'm using the following Access 97 code to create a table from specifications stored in another table. It worked fine, until I added the statement "tdf.Fields.Append fld" inside of the Do While loop, and I can't figure out why. The help screen for the Description property (applicable to Field...
  2. A

    Option button help

    If each person may belong to multiple groups, you could do either of the following: 1. Use a subform to display and edit the list of groups each person belongs to. 2. Use a command button to open a separate form listing each person's group membership(s). In the command button's Click event...
  3. A

    Option button help

    I'm not sure what you mean by the arrow buttons. If you set it up as I suggested, the form will automatically reflect each person's group status as you move from record to record.
  4. A

    Save variable from Dlookup to field?

    'for Access 97 - DAO coding is slightly different in later versions Dim dbs as Database, rst as Recordset Set dbs = CurrentDb Set rst = dbs.OpenRecordset ("MyTable") 'put Move/Seek/Find coding here to make desired record current rst.Edit rst!MyField = DLookup("MyOtherField", "MyOtherTable", _...
  5. A

    Checking controls on a form...

    First, it's not good practice to use a GoTo to branch into or out of a control structure like If Then ... End If. Also, since TabIndex is an Integer or Long property, it's probably not a good idea to use a Single variable to track it - I would declare LwstTbIndx as Long, and initialize it at...
  6. A

    Option button help

    An SQL query does not go into an option button or option group. Anyway, you don't need the yes/no options if you're already showing the group name, and you don't even need a query. Just base the form on the Personal_Info table. Use a combo box, populated by all the available groups from the...
  7. A

    choice button_problem

    One way to do this is to use the option group wizard to build the option group (a rectangle with several option buttons). You would specify "processed", "rejected" and "in progress" as the choices, with 1, 2 and 3 as their corresponding values, and indicate that the choice should be stored in...
  8. A

    Editting borders in Excel through Access

    I'm not sure, but my guess is that you are referring to constants (.xlcontinuous, .xlHairLine and .xlAutomatic) which are defined in Excel but unknown in Access. If so, one workaround would be to write code in Excel to display the actual numeric value of those constants in a message box, and...
  9. A

    Sending an Access module into Excel using VBA

    It's easy enough to simply copy code from an Access module and paste into an Excel module, but you'll still need to deal with differences between the Access object model (tables, fields, controls, records, etc.) and the Excel object model (sheets, cells, rows, columns, etc.). What you may want...
  10. A

    Getting data from SQL Server Tables from Access

    Here's some demo code to get you started. You'll need to get the specific values to assign to sConnect from the administrator of the SQL database. Option Compare Database Option Explicit Sub ODBC_Demo() 'demonstrates how to read an ODBC data source from VBA code Dim Wrk1 As Workspace...
  11. A

    I need Help: Auto set yes/no to yes on entry of data in a form.

    If there could be a 0 amount transaction, then yes, it would show as a donor if for a 0 amount. If you eliminate the field and query the transaction table instead, that will work but could create problems down the road if (a) the transaction table gets so big that the query slows down...
  12. A

    How do I substitute Ctrl + Enter when the user hits Enter?

    Set the text box's EnterKeyBehavior property to New Line In Field.
  13. A

    Subform and Combo box problem

    Add a criteria to the subform query, so that it returns only records whose Semester field matches the semester selected from the main form's combo box. The query criteria for the Semester field in the class table might be something like this: Forms!Main!cboSemester
  14. A

    I need Help: Auto set yes/no to yes on entry of data in a form.

    Probably the best way to do this would be to have your main form (not just the combo box) bound to the contacts table, and a subform (perhaps in continuous form view) bound to the donations table. When the LinkChild and LinkMaster properties of the subform control are properly set, as you move...
  15. A

    Referencing a field in a table from a form

    I don't think you can just refer to a table field the same way you would refer to a form field. For one thing, since tables typically have multiple records, there needs to be some way to specify which record's value you want for the specified field. You could use DAO recordsets (or ADO if you...
  16. A

    Editing text files?

    Unless you're planning on totally bypassing the operating system's file handling routines and doing reads and writes to specific disk clusters (not a good idea unless you REALLY know what you're doing and have a compelling reason to do so), the only way to search or edit a disk file is by...
  17. A

    Referring to a subform in visual basic

    Is [Pole Attributes] the name of the subform control (in which case it should work) or the name of the form displayed by the subform control (in which case it probably won't work)?
  18. A

    Formula Query

    The only possible problem I see is in the first line, where I typed ">=15" instead of ">= 15", but I don't think the lack of a space there is signficant. I can't see anything else wrong with it either. The only suggestions I have are to be sure to use Copy and Paste instead of re-typing the...
  19. A

    how to change Value of listbox in VBA

    My co-workers solved this one. I can simply directly assign a new value to the listbox, which both changes its value AND the selected item, like this: MyListBox = [new value]
  20. A

    Formula Query

    Try this: Result = IIf(([Case Study Actual Mark] >=15) And _ ([Audit Actual Mark] >= 15) And _ ([Exam Actual Mark] >= 15) And _ ([Project Actual Mark] >= 15), _ ([Case Study Actual Mark] * 0.15) + _ ([Audit Actual Mark] * 0.15) + ([Exam Actual Mark] * 0.3) + _ ([Project...
Back
Top Bottom