Search results

  1. B

    Play a certain sound on command

    How would you play your own sound bites when you want?
  2. B

    Use bookmark to delete a record

    Can anyone think of why the following code wouldn't delete the record pointed to in the bookmark? When I run it, nothing gets deleted. Private Sub DeleteMyData(Subform As Integer) On Error GoTo Err_DeleteMyData Me.Bookmark = varEquipRecord(Subform) DoCmd.DoMenuItem acFormBar, acEditMenu, 8, ...
  3. B

    Close a combobox in code?

    I have a combobox that on the MouseDown event checks to see if it is Null or if there is previous data in it. If there is previous data in it, a pop-up window comes up giving the user some choices in what they are trying to do. All of the "change" options work fine. They return a value to the...
  4. B

    On Change Event

    I have a bit of a twichy on Change event problem. When I first load the form up and change a txtbox, the on change event seems to work fine (more on that later), doing exactly what it is supposed to do, which is loop through a series of records comparing the value I entered to the recordset to...
  5. B

    On Change event

    I have a bit of a twichy on Change event problem. When I first load the form up and change a txtbox, the on change event seems to work fine (more on that later), doing exactly what it is supposed to do, which is loop through a series of records comparing the value I entered to the recordset to...
  6. B

    Perform action on sequential variables

    How do you call a series of sequentially numbered variables? In a While loop I'd like to store the record bookmark to a variable. So Record1 = rst.bookmark the first time a record is accessed, then Record2 = rst.bookmark and so on. ("Record" & counter) = rst.bookmark doesn't seem to do the...
  7. B

    set form control based on recordset field?

    How do you set a form control based on a value in an ADO recordset? For example, say you have a recordset "rst" which has a field called "Name", which in turn stores a numerical value based on which name it is supposed to represent. So the rst field "Name" will hold things like: 1, 4, 7, 3...
  8. B

    Check form control vs. recordset field?

    How do you check to see if a form control is equal to a recordset field value? For example, if in an option group you set option with a value of '1', how do you check to see if a field in a ADO recordset is = 1? Here's my guess (which is not working): If Me!optHeat = rst.Fields("Heat") Then...
  9. B

    Best way to search recordset and set up a form?

    What's the best way to search a recordset in VBA to see if several criteria match in a record? For example, after a few controls are set, I'd like to search for any records matching those settings. Once found, I'd like to be able to edit a few other fields in that record via some txtboxes on...
  10. B

    Bookmark trouble

    I'm having trouble implementing a bookmark. The form's recordset is set to the correct table: RawResults. I have a subrountine which creates a new record and then populates a few fields with some text. Then I try to grab that record's bookmark - but it seems to come back with the bookmark for...
  11. B

    Select a record through VBA?

    How do you select a record based on its key? For example, I want to edit record #31 on this next action... how do I grab that record? Partially as an addendum, how do you set the current field you are searching in? For example this line of code: DoCmd.FindRecord Record1, acEntire, ...
  12. B

    How to move to new record?

    Based on the settings of two combo boxes, how do you lookup in the form's recordsource to see if there is a record matching these settings, and if not, create a new record with those settings? Also, say you have completed the task in the previous question and have the record you want, how to...
  13. B

    Storing info in txtbox into table?

    I'd like to grab data in a txtbox, perform a few calculations on it and store it in a field (based on a few of the control settings) of a record (again based on a few controls) in a table. I can't lock the txtbox to the table because I need to perform a few calc's when getting data from a field...
  14. B

    Updating a label with a series of messages

    How would you update a single label with a series of text messages based on an index? For example, let's say you want your label to display the days of the week. So when an index = 1, the label would read "Monday", etc. My start is: Const Daylabel1 As String = "Monday" Const Daylabel2 as...
  15. B

    Controling objects on subform from a mainform

    I have a series of txtboxes on a series of subforms that I'd like to hide or make visible when a control on the main form is switched. How would you do so compactly? I know how to alter one command at a time on a series of subforms for example: Me("FullResultsForm" &...
  16. B

    How to pass values between forms?

    How do you pass a value in a module in the mainform to a subform? I have a timer running in the mainform that saves the current time in milliseconds into the variable "tempTime". When a user presses a command button on the subform, I'd like the time to be stored in a txtbox, so the subform has...
  17. B

    Grab data from record based on combo box?

    Pretty basic, but I can't find this in my texts: If a user selects from a combo box that is based on a table column, how do you store a value from another column of that same record to a variable? ie they select "Brian Jessup" from the combo box, and the value "Can't figure this out" from the...
  18. B

    how to update txt boxes in sequence?

    Hi, Does anyone know how to create simple code that will update a series of txtboxes in sequence with a counter? For example, when counter = 0, update "txtbox1" when counter = 1, update "txtbox2" and on and on. Right now I'm using a bunch of IF statements, but with 66 txtboxes, that's a lot of...
Top Bottom