Search results

  1. rockman

    VbMsgBoxSetForeground

    Does anybody understand the vbMsgBoxSetForeground parameter in the MsgBox function? MSAccess help says: "VbMsgBoxSetForeground: Specifies the message box window as the foreground window" But isn't the MsgBox always the foreground window? Thanks, Jeff
  2. rockman

    Change value of a textbox within the BeforeUpdate or AfterUpdate event

    Thanks Peter that worked.
  3. rockman

    Change value of a textbox within the BeforeUpdate or AfterUpdate event

    I get an error, "The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing MyDatabase from saving the data in the field.", when I run the following code: Private Sub txtHeight_BeforeUpdate(Cancel as Integer) If Instr(1,txtHeight.Text,"in") then...
  4. rockman

    draggable controls?

    You can accomplish this by using the MouseOver event to change the location of the object (picture box) according to the X and Y parameters that are passed to the MouseOver event. In addition, you can make it more user friendly by using the MouseDown and MouseUp events to "turn on" and "turn...
  5. rockman

    How to add key field to result of query?

    Got it working quickly now. Thanks for both your help, Pat and dcx!
  6. rockman

    How to add key field to result of query?

    Good Golly! Thanks dcx for setting me straight on the deleting records issue! I learn something new everyday! And luckily this time before I started indiscriminately deleting all my data! Geez! I'm trying to implement the First() function but for some reason the response is exceedingly slow...
  7. rockman

    How to add key field to result of query?

    Thanks for your response Pat. I'm creating my own recordset based on the querydef, as in: Dim rs as ADODB.recordset rs.Open "SELECT * from MyQuery", CurrentProject.Connection I think I can safely delete records in rs without deleting data in the underlying data tables. Please let me know if...
  8. rockman

    How to add key field to result of query?

    I can't use the DISTINCT qualifier because the records returned are all DISTINCT. Example query recordset: ApptID PatientName Insurance 1 Jones BCBS 2 Smith TriCare 2 Smith Medicare 3 Peterson...
  9. rockman

    How to add key field to result of query?

    I have a query that returns a list of appointments. Some of the appointments are listed twice because of a one-to-many relationship in one of the associated fields. If I try to loop through the query results to delete the duplicated appointments, I get an errror "Insufficient key column...
  10. rockman

    Get the option group of a particular control

    Thanks for the tip. I had used Forms!myForm!chkDaily.Parent and it returned "-1". But your post prompted me to try Forms!myForm!chkDaily.Parent.Name which does indeed return "grpChoices". Thanks again, Jeff
  11. rockman

    SetFocus in Option Group - Bug alert

    Yes, I see your point. I'm using Access 2000 on Windows XP Home. No Microsoft Knowlegde Base articles relating to this topic based on search of "SetFocus Option Group".
  12. rockman

    Get the option group of a particular control

    How can I get the name of the option group that a particular control belongs to? Example: Option Group Name = grpChoices A control's name within the option group = chkDaily Is there some syntax to obtain the name of the option group given the control's name? Like ...
  13. rockman

    SetFocus in Option Group - Bug alert

    FYI- Many of you may have noticed that you cannot SetFocus to a control within an "option group" -- you will get the following error: "Run-Time Error '2110': Microsoft Access can't move the focus to the control xxx" Your work-around is to SetFocus to the Option Group and not one particular...
  14. rockman

    Use Recordset as Form Recordsource

    Seems like Rich has the answer there... Syntax should be: Set Forms!frmWIP.Recordset = rst HTH, Jeff
  15. rockman

    mail merge question

    Omitted: The combobox (cmbFriend) control source = fldFriendID
  16. rockman

    mail merge question

    This will be by memory, but should get you started: Create a form that only has a combobox on it. Set the record source of the form to tblAlumniFriends (see first post). Let the combobox rowsource be a query on your table tblAlumni that has field 1 = fldAlumniID and field 2 = fldName. Set...
  17. rockman

    mail merge question

    Having a list of names in a single field will probably be too unwieldy to accomplish what you want. No doubt each alumni has a unique ID in your current database. Create a table with the following structure: tblAlumniFriends fldDummyID ' (autonumber) fldAlumniID ' contains alumni's ID...
  18. rockman

    AccessXP Code Showing When Running Program

    This has rarely happened to me as well. Try selecting the "Clear All Breakpoints" from the Debug menu -- even though there is no visible breakpoint in the code. This seems to have helped me in the past with this "bug". HTH, Jeff
  19. rockman

    Navigate a Query

    I've been trying to accomplish this (query data into recordset) in ADO but having some problems with certain queries: This works: Set cn = CurrentProject.Connection Set rs = New ADODB.Recordset Call rs.Open("qryContacts", cn, adOpenStatic) This doesn't work: Set cn =...
  20. rockman

    Table design ideas needed (warning!! very long post)

    You are correct that the "5" separate error fields is a poor design. I think it would be even poor design if there could only be 2 possible errors! Hence, this is how I would tackle it: tblApplications fldApplicationID (autonumber) fldCriteriaNotMet fldInvalidID fldLateApp tblErrorTypes...
Back
Top Bottom