Search results

  1. B

    Don't know if it can be done.....

    Doh! That is a much easier solution than I have employed. I have always used the Current Event to store the value in a variable, and then compare it to the new value. I'm going to try that.
  2. B

    filter by current user

    Maybe try this. Dim strFilterCriteria as string strFilterCriteria="[modifiedby]= """ & currentuser() & """" me.Filter=strfiltercriteria me.filteron=True Don't know for sure if it will work. Forget the exact syntax Duane Barker
  3. B

    Tabbing in a Form

    To get the tab to move to the sub-form after the last field, you need to do a couple of things. 1. Set tab stop to true for the sub-form 2. Set the sub-form in the tab-order after the the last field in the header info. you can set the tab order in the properties of each control by numbering...
  4. B

    Compile Error:

    This is a shot in the dark, but do you have any modules that are missing in the new database? Duane Barker
  5. B

    validate data and cancel if answer is false

    You can use the Docmd.CancelEvent to keep the user in the control. All you really need is: msgbox$(strmessage) doCmd.CancelEvent me.EmployeeNumber.Setfocus If you want to replace the text to what was previously in the control, capture the data in a variable with the OnEnter event, and then...
  6. B

    Code not working in 2000

    What kind of error are you getting? Is the report blank, or is there an error message? How do you assign the recordsource of the report? If you use this code to assign the recordsource, you may need a statement like: RptName.recordsource=rst? I'm not too sure though, I don't usually...
  7. B

    Multiple Filter Criteria

    There is a problem with your string formatting. Try this instead: strWhereCity_Status = "City = """ & Forms![frmDialogForm]!SelectCity & """ and Status = """ & Forms![frmDialogForm]!SelectStatus & """" This is assuming that both of the criteria are strings. If they are numeric, remove "" on...
  8. B

    Compile Error:

    Have you checked your references in the second database? If you are using DAO objects in code you may need to add the Microsoft DAO(3.6) library. Hope this helps Duane Barker
  9. B

    Remove a Filter from a Recordset

    How do I remove a filter from a DAO type recordset. I need to use Filter instead of FindFirst, Seek because I need to access the RecordCount property. I tried using: rst.Filter= "" No Luck I also tried rst.Filter = adFilterNone Not sure if that worked either I am using this inside a...
  10. B

    If Or Then Question!

    You could use a simple If Then Else statement. If Timeclass = "TR" Then Earncode=9 else If Timeclass = "FT" Then Earcode=10 Else 'Not a valid time Class EndIF EndIF
  11. B

    Closing Recordsets in Nested transactions

    Can you close a recordset in a nested transaction, and still be able to roll it back if the main transaction is rolled back? In order to keep my database consistent when a user makes changes, I need to Undo all previous updates, and then Update with the new information. I capture the old data...
  12. B

    error message

    I guess one way you could handle this would be to search your table for a record with the matching primary key. You would need to write this code in the BeforeUpdate Event on a data entry form. You couldn't use it in a datasheet. dim rst as dao.recordset dim db as dao.database dim strSQL as...
  13. B

    Confirming Recordset Updates Succeed

    Thanks for your help so far. I have written most of my update code. My assumption from your feedback so far is that I write an error handling statement, and include the check for transStart = false. I understand that much. The problem I have is identifying if an error has occured. What sort...
  14. B

    Confirming Recordset Updates Succeed

    I have been led to believe that once I perform my CommitTrans, that I will be unable to Rollback. Every time I use the Update method on a recordset object, is there a way to check that it succeeded? This is important, since I have a multi-user environment, and I may get record=locking...
  15. B

    Confirming Recordset Updates Succeed

    I am writing some transactions involving multiple recordsets and multiple tables. I have begun writing with the BeginTrans method of a Workspace object. I would like to group a number of recordset updates into one transaction, but I don't know how to confirm that all updates succeed before I...
  16. B

    Using Three Unbound Fields to Filter Form???

    I also have had problems using the findfirst method. I compensated for it by specifying the criteria in an SQL string. eg. dim rs as dao.Recordset dim db as dao.Database dim strSQL as string strSQl="SELECT * FROM Tablename WHERE Criteria;" set db=currentDb set rs=db.openrecordset(strSQL)...
  17. B

    Printing of report from a particular record to a particular record

    Here is what I would do. Code for the OnClick Event: 'Assume voucher number is integer dim intVariable as integer dim intVariable2 as integer dim strTemp as string strTemp=inputbox("Enter Voucher Number to Start from") 'Check to see if entry is numeric If isNumeric(strtemp) then...
  18. B

    Limit to the Number of Form Modules?

    Is there a limit to the number of form modules you can have in a single MDB? My current application has around 50 different form modules. I have been having serious memory problems when trying to write in the Editor. I have checked my system resources, and I have in excess of 40 Meg of...
  19. B

    Linking Multiple forms to a field in the first form opened

    There are a couple of different ways you could accomplish this. I am assuming that The easiest way is to use one form for all of the information. You could use a Tab Control, and place each of the sub-forms on a separate page. The other way would be to write some code for the command...
  20. B

    I need a field that can handle one entry or multiple entries. How do I do this?

    You would need to create a table with two fields. ProjectID Collaborator You would place these fields in a subform of your main project form so that you can add multiple collaborators for every project. Join the forms on the ProjectID field, and set cascade update in your relationships so...
Back
Top Bottom