Search results

  1. Elana

    Add up field values in a Loop

    I'm trying to write some code where Access looks at the value of fldPct in a form's recordset (sometimes just one record, sometimes up to 8 records will be displayed on the form) to confirm that the values add up to 100% before the user exits the form. If the values are less than 100, then it...
  2. Elana

    Yes/No field in Make Table Query

    A boolean value is True/False, not Yes/No. You can also use -1 and 0, which mean True or False. I guess I don't understand why you want to store the words instead of the numeric value which means the same thing...maybe I'm not understanding what you're trying to accomplish?
  3. Elana

    Insertion Point Start

    Why don't you take the input mask off the fields and instead try the strConv function on each field - place it on the AfterUpdate event on the field: Me.[txtFirstName] = StrConv(Me.[txtFirstName], vbProperCase) [This message has been edited by Elana (edited 04-09-2002).]
  4. Elana

    Yes/No field in Make Table Query

    Yes/No fields return the value 0 for no and -1 for yes. IF you want the query to say YES or NO, then create another field in the query grid: YESNO: IIf ([ynField]=-1 "YES", "NO") EB
  5. Elana

    Combo Filter

    Set your second combo box's Row source to: SELECT "field1, field2, etc." FROM "yourtable" WHERE "ID of record in yourtable" = forms!frmYourForm!combobox1 ORDER BY "whatever sort order you want"; [This message has been edited by Elana (edited 04-09-2002).]
  6. Elana

    Recordsets ....I'm missing something easy here.

    Okay, I figured it out myself! Just add rst1.movefirst to the code just prior to the DO Loop.
  7. Elana

    Recordsets ....I'm missing something easy here.

    Okay, I've figured out part of this - the second time I try to run the code, it bypasses the DO Loop because the recordset clone is already at the EOF. But, I thought if I closed the recordset at the end of the procedure, that it would wipe out the recordset clone. Obviously I'm missing...
  8. Elana

    Recordsets ....I'm missing something easy here.

    Hi Rich - thanks for looking at my post. As a bit of background, I need Access to look at the underwriters listed on the subform and add a record to tblUwrByClaim for each underwriter on the form. The thing is, this code works just fine, so long it only runs on the first record after I open...
  9. Elana

    recordsetclone not working

    Try referring to another recordset in the same procedure that looks at the table as a whole and counts those records. dim rst2 as recordset rst2 = ("tblYourTable", dbopentable) rst2.movelast msgbox "You have " & rst2.recordcount & "records in the table" [This message has been edited by...
  10. Elana

    recordsetclone not working

    I'm no expert, but I just worked on this and was successful in returning the record count. dim dbs as Database dim rst as recordset set dbs = Currentdb() set rst = me.recordsetclone rst.movelast msgbox "You have " & rst.recordcount & "records." Hope this works for you. PS - Look up...
  11. Elana

    Code to AddNew to Recordset only works part of the time

    Thanks Rich. I know I broke the rules, but I'm so desperate for an answer that I posted it here too, hoping someone with VBA expertise could help me, in case they weren't looking in the forms forum. EB
  12. Elana

    Code to AddNew to Recordset only works part of the time

    Here is my code to add records to a table based on records shown on a subform. Problem: This will only add records if I open the form and run the code on the first record. If I move to another record in the form and attempt to run the code, it will not add records to the table, BUT, If I...
  13. Elana

    Recordsets ....I'm missing something easy here.

    For now I have it attached to a button. I'm going to move it once I've worked out the glitch. I'm using a recordset clone because I need to refer to the records behind one form to add records to a table. It was the only way I could think of to do it. It works just fine, except for the...
  14. Elana

    Please Help Me

    So create another text box that will show the "lunch" or "break" description. Place code behind the After Update event of your time field... Be sure to confirm how the time is being stored in your field so you get the syntax right on your Select Case statement. Also look up Select Case under...
  15. Elana

    Recordsets ....I'm missing something easy here.

    Here is my code to add records to a table based on records shown on a subform. Problem: This will only add records if I open the form and run the code on the first record. If I move to another record in the form and attempt to run the code, it will not add records to the table. If I close...
  16. Elana

    subform and tab issues

    Have you tried setting the Cycle property to current record?
  17. Elana

    Automatically Add Records to a Table

    Whoooeeee I figured this out by myself! Dim dbs As Database Dim rst As Recordset Dim rst1 As Recordset Set dbs = CurrentDb() Set rst = Forms!frmClaimsEntry!frmPolicyUwrsSubform.Form.RecordsetClone Set rst1 = dbs.OpenRecordset("tblUwrByClaim") Do...
  18. Elana

    Referring to a form with Form("FormName")

    Sorry, I read through your first post too quickly. I'm pretty sure that when you use Forms( ), that Access is looking for the index number of the form you want, not a string. If I had a little more time this afternoon, I'd love to help you out, but I have to leave. I hope someone else will...
  19. Elana

    Referring to a form with Form("FormName")

    Check this out at the Microsoft Knowledge Base (if you are using Access 97), the Access 2000 question is Q209099 http://support.microsoft.com/default.aspx?scid=kb;en-us;Q113352
  20. Elana

    Automatically Add Records to a Table

    Hi - My app is a claim administration app for an insurance brokerage. I have a main form (frmClaimsEntry)where the user selects an insurance policy and a subform (frmPolicyUwrsSub) that displays the insurance company(ies)subscribing to that policy. Here's what I need to do. For each ins...
Back
Top Bottom