Search results

  1. R

    acFormReadOnly Allows Edits bug.

    Me.AllowAccess should have been Me.AllowEdits. I was brain dead by the time I posted the message.
  2. R

    acFormReadOnly Allows Edits bug.

    This line is in the OnClick event of a subform. I want to open stDocName read only. DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly, , strCaller When the form opens Me.AllowAccess is false in both the Load event and the OnCurrent event. Yet I can edit all the data, close the...
  3. R

    Find current record when moving from one form to another

    You have to do the FindFirst. That's what set's the .bookmark value.
  4. R

    Find current record when moving from one form to another

    Your earlier statement about it getting complicated is very true. You'll find the best approach depends on the details of what your trying to do. However, the following should get you started. Have fun. Modify the sample code JHB sent you to something like this. (I edited the variable names...
  5. R

    OnGotFocus event

    I'm brain dead. It's was a sub. Changed it to a function and all is well. thanks!
  6. R

    Find current record when moving from one form to another

    You can create Properties (Get, Let) on the forms to pass the data about it's current record, then write code in the OnActivate, and OnDeactivate events to sync the forms. When you leave a form OnDeactivate should set the data. When the other form is activated, OnActivate should read the data...
  7. R

    Query Criteria - All Results If Blank

    Try something like this: Like IIf(Nz([Forms]![frm_main_menu]![Week],"*")="*","*",[Forms]![frm_main_menu]![Week])
  8. R

    Detail Section Question

    I think you need a subreport in the Report detail section that prints the records contained in the subform on the main form.
  9. R

    OnGotFocus event

    I am trying to set event handlers on multiple controls in code. This works: Me.Controls("txtPosition" & Right(CStr(iLoop + 100), 2)).OnClick = "=UpdateTaskList(" & CStr(iLoop) & ")" This doesn't: Me.Controls("txtPostIt" & Right(CStr(iLoop + 100), 2)).OnGotFocus = "=PostItGotFocusHandler2()"...
  10. R

    Adding OLE Object to existing database.

    I've found lots of post that say "don't use OLE Objects", but in this case I need to add objects to an existing database where the front end code is an .mde file and the orignal .mdb is no longer available. The field is PHOTO and field type is OLE Object I've tried !Photo =...
  11. R

    Weird 2448 run-time error.

    I have a form that opens a report in a button click event. DoCmd.OpenReport strReport, acViewPreview The report has code in the Report_Open event to read a value on the form and change the RecordSource. In the Report_Load event the following line Sometimes gives me a runtime error 2448. at...
  12. R

    What's this format string do?

    I inherited an Access 2000 (2002?) database that uses a textbox behind another to change the background color based on two different fields. The Format property is set to: "ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ"[Green];"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ"[Yellow], the Data ControlSource is set to...
  13. R

    How to auto copy fields from one record, and paste to current record?

    Just noticed the last post, are you still having problems? It has been my experience that when the error is on the declaration line of the sub routine or function that there is a compiler error. In other words, look for another typo or syntax problem. One check is turn off Option Explicit...
  14. R

    How to auto copy fields from one record, and paste to current record?

    Also the last part should read ... "UniqueId = '" & strImportRecord & "'" strUniqueId is not defined in your code.
  15. R

    How to auto copy fields from one record, and paste to current record?

    There's a typo in the your last post. See the asterisk * near the end. That should be an ampersand, &.
  16. R

    form returns records not in record source

    Sounds like the Date field has a default set to =Now() or =Date(). If it doesn't find a matching date it's defaulting to a new record. Try setting the forms Data>Allow Additions property to No and see if the new record goes away. You could also add a Command button to turn "Allow Additions"...
  17. R

    Any sample forms using a whole month data input?

    Is this one of those cases where the manager says: "I want a form that looks like this spreadsheet?" If so, you will probably need to create a form with a bunch of unbound controls, then use code to sequence through a record set and label and populate the controls with data. Let the user edit...
  18. R

    How to auto copy fields from one record, and paste to current record?

    If I understand right, your "UniqueId" is a string. Thus, the last part of the line should be ... "UniqueId = '" & intUniqueId & "'". That's a single quote, ' , inside the double quotes. Also, good coding practice says the variable should be strUniqueId. As written, using an int prefix for...
  19. R

    Hello

    Have worked with Access for years, mostly Access 97, some Access 1.0, 2.0, 2000, 2002, and now 2010. New to 2010, not having used Access much for several years. (C++ for the last 7) Discovered a few surprises with 2010. Some may be because I've got Ansi-92 switched on for SQL.
Back
Top Bottom