Search results

  1. B

    2 Page Form

    Use the Tab Control. Depending on your table structure, you could link sub-forms onto multiple pages, or if you have a large table, group the controls on the different pages. Duane Barker
  2. B

    linked field is always editable - don't want that

    Why would you need to delete the sub-form and then add it to make changes? Sounds a little buggy to me.
  3. B

    Coding for Email

    I don't have an answer for the e-mail question, but I have a question of my own regarding your code. What purpose does the variable tdf serve? I have never used a tableDef object in my code, nor would I know how to use it. As for the second question regarding setting up a separate table with...
  4. B

    creating and running a SQL statement in VB

    Write the SQL code as you normally would. Assign the SQL statement to a string variable, and use this variable when needed. eg: strSQL="SELECT * FROM Table WHERE [Field] = Criteria ;" If you want to use variables in criteria, use string concatenation. Dim strVariable as String Dim...
  5. B

    Trying to use a function to fill a text box

    I will muddle through the code tonight. To set a breakpoint, click to the left of the line where you want it to stop. A red dot will appear beside the code. When you run the code, it will stop when it reaches the red dot. Duane Barker
  6. B

    Trying to use a function to fill a text box

    Have you stepped through the code to see the values of your variables as your program functions? Put a breakpoint on your function call, and see if you can't solve the problem there. It seems to me that your function may not be returning a value to the text box. provide a sample of the...
  7. B

    vat calc done on form not in table

    Your Unbound text box just displays the calculation. It is not considered good design to save calculated values in the table. Duane Barker
  8. B

    Primary Key

    When you are creating the new record on the second form, Access does not know what Unit Number to use. In a sub-form with links established, it uses the value from the main form. Here is what I would do. On the Command button, send the Unit Number on the form open call. Dim strOpenArgs as...
  9. B

    Problem with Access updating data incorrectly..

    Is your combo box unbound? If you bind it to the link field, it should work. Duane Barker
  10. B

    Select name in combo box & have rest of form fill out automatically?

    See post for Gram123 Duane Barker
  11. B

    Urgent!! How do I fill in a form control based on data in a combo box

    Place this code in the Before Update Event of the combo box. Set the Combobox Limit to List Property to Yes If Isnull(Me.CombControlName) = True Then 'Do nothing Exit Sub Else Dim rst as DAO.Recordset Dim db as DAO.Database Dim strSQL as String Set db=CurrentDB 'If code field is numeric...
  12. B

    Fill in a form control based on another control

    the Me. references the Current Form. Instead of typing Forms![CurrentForm]![ControlName] you type Me.[ControlName] Duane Barker
  13. B

    unique value in combo box

    If you want the Appraiser field to be unique, go to your table definitions, and set the Index property to Yes(No Duplicates) Duane Barker
  14. B

    Help- Open recordset

    I think I see your problem. I don't think you can use a Query in the call. *Not sure though cause I've never tried it.* I always prefer to use an SQL statement in my Open Recordset call. The SQL you wrote should be changed to : strSQL="SELECT WTN from WTNS WHERE BTN= """ & Me.btn & """ ;"...
  15. B

    Calculating Totals on a Form

    The problem is with NULLS Use this expression. [Field D]=nz([Field A])-nz([Field B])-nz([Field C]) 'The nz() function changes any null or "empty" values to 0 Duane Barker [This message has been edited by BarkerD (edited 01-15-2001).]
  16. B

    Copying Info in macro

    It sounds like you need to normalize the structure of your application. If you have information that is duplicated in records in the same table, or in different tables, this is a good indication that it is a separate data entity. Duane Barker
  17. B

    Understanding Code execution in Reports

    Thanks, Pat. I will look it up Duane Barker
  18. B

    recordsets and subforms

    Use this format to requery subforms. Forms![Mainform]![Subform].Requery Duane Barker
  19. B

    Command Button to update tables

    You will need to use a transaction to accomplish this. This will keep your database in a consistent state. If an update fails between the BeginTrans and UpdateTrans, you can RollBack the updates. On Error GOTO UpdateError Dim wrkDefault as Workspace dim rst as DAO.recordset dim rst2 as...
  20. B

    Understanding Code execution in Reports

    Thanks Pat. I don't know why I didn't think about using the footer. I don't believe I have scope problems, I think that the detail section is being formatted more times than I realize. I will have, say 100 iterations expected, and my coutner will be 800 or so. This really causes a problem...
Back
Top Bottom