Recent content by Fernando

  1. F

    Solved Focus opened instance when luser tries to open a second instance

    I finally got it, since SW_RESTORE works but SW_SHOW doesn't, i just added a line to MINIMIZE the window and then RESTORE IT! to create the effect of focusing. 'Instead of this: ... If apiIsIconic(hWndApp) Then apiShowWindowAsync hWndApp, SW_RESTORE Else apiShowWindowAsync...
  2. F

    Solved Focus opened instance when luser tries to open a second instance

    Hi, thanks for the response. What happens is that the users tend to forget they have an instance of the db open (since the window is lost in the many windows they have open in the windows' start bar), so they try to open a new one. So what i would like to do is if they try to open a second...
  3. F

    Solved Focus opened instance when luser tries to open a second instance

    Hello access gods, I have successfully implemented the code to prevent multiple instances from this article found in this forums : http://www.mvps.org/access/api/api0041.htm Now, can someone please enlighten my path on how to automatically focus on the original instance after preventing the...
  4. F

    Question Use Login to limit records that can be edited but allow to view all

    Here is the function to get the USER NAME from windows. Hopefully this will help. Create a module (modGetUser). Option Compare Database Option Explicit Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As...
  5. F

    Tabledef, querydef, recordset

    Hi, i have never really understood the main difference between those three. I've been always using recordset, i would like to know: When should i use the other two?
  6. F

    Compact backend (with password) using Application.CompactRepair

    I created a function to compact/repair all the backends of the current app. It perfectly fits in the last form to be closed on exit, just remember to close all recordsets and clear recordsources from the form and rowsources from comboxes Public Sub subCompactBackEnds() Const strTblSysObjs...
  7. F

    Compact backend (with password) using Application.CompactRepair

    Solution I guess this resolves my question lol DBEngine.CompactDatabase strSource, strDestination, ";pwd=password", , ";pwd=password"
  8. F

    Compact backend (with password) using Application.CompactRepair

    From access help: Function RepairDatabase(strSource As String, _ strDestination As String) As Boolean ' Input values: the paths and file names of ' the source and destination files. ' Trap for errors. On Error GoTo error_handler ' Compact and repair the...
  9. F

    between and date problem...Help

    Use this to open your report from your form DoCmd.OpenReport "YourReportName", acViewPreview, , "Founding >= #" & Me.FoundingFrom & "# AND Founding <= #" & Me.FoundingTo & "#" Replace FoundingForm and FoundingTo for the text box name that you are using
  10. F

    Refresh Subform

    Use DSum on the after update event of your date range textboxes
  11. F

    Subform Combo box issue

    in cmbPrinciple rowsource's criteria for performance, chamge cmbOutcome to cmbPerf. I havent seen your tables but now that i have, you should try to read about "Database Normalization" your db needs to be normalized.
  12. F

    Left Join query on form shows null state on chkbox and blank state on query

    You cant have them with IFF or NZ because then you cant update them, thanks anyways.
  13. F

    Fire event when tab selected?

    try: If forms.frmMyForm.txt35 =yes then your controls are owned by your form, not by your page.
  14. F

    Subform Combo box issue

    my bad, you have to use . instead of ! i thougth you could use both.
  15. F

    Subform Combo box issue

    That is on your combobox rowsources in tblDetail subform
Top Bottom