Search results

  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
  16. F

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

    lol Telecom, ok lets put it this way. This is my info tblJob -JobID as PK -JobName as Text -Inactive as boolean and other non significant fields for this problem qryActiveJobs SELECT tblJob.JobID, tblJob.Jobname FROM tblJob WHERE (((tblJob.Inactive)=0)); tblJobView -JobID as FK -View as...
  17. F

    Error "The Value you entered isn't Valid for this Field"

    If you dont need the $ on the prices this will fix it: Case "Price" strSQLSelect = "SELECT DISTINCT '' & tbl_Contracts.fld_Price, tbl_Contracts.fld_Price " strSQLFrom = "FROM tbl_Contracts " For some reason the combobox remembers the first field type so if you use...
  18. F

    Subform Combo box issue

    When referring to a subform's control you have to state it like this: Forms![mainform]![subform]!Form![Control] So intead of having this: [Forms]![tblDetail subform]![cmbOutcome] You should have this: [Forms]![frmMain]![tblDetail subform]![form]![cmbOutcome] That will fix your problem...
  19. F

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

    Im using this for the query SELECT qryActiveJobs.JobID, qryActiveJobs.JobName, tblJobView.View FROM qryActiveJobs LEFT JOIN tblJobView ON qryActiveJobs.JobID = tblJobView.JobID; Because i dont have a record on tblJobView for each in qryActiveJobs. tblJobView records will be created when needed...
  20. F

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

    That wont work because it will show me only the records he selected in the past at least once (so it would have created a record on tblJobView). And i want to show all Job records like im doing on the example.
Top Bottom