User Profile

Collapse

Profile Sidebar

Collapse
Yousaf Shah
Yousaf Shah
Last Activity: Jan 2 '21, 03:58 PM
Joined: Feb 24 '11
Location: Pakistan
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I read https://docs.microsoft.com/en-us/off...lorscheme.load but could not apply this method in Access. It might be due to lack of knowledge at my end. It will be more helpful to me if you could guide me a code to open Theme Selection Window (screenshots attached). I want to open selection windows shown in 2nd.png with code. Thanks...
    See more | Go to post

    Leave a comment:


  • How to change access database theme with code?

    I am working on patients' record database, which I made using Access 2010. when I open it in Access 2016, its theme gets changed altogether. I fixed it by saving 2010 theme by using 'SaveToFile' method and then updating theme in Access 2016 by using Themes > Browse for Theme.. in 'Themes' portion of 'Design' Tab.
    I Want to open that Browser window with code but could not make it. I tried to use following code to update 'Office Theme' record...
    See more | Go to post

  • Thanks jforbes
    I have changed your code a little to fulfill my requirements and its working fine.
    New code is as follows
    Code:
    [CODE]Function NextFileInt(StrPath As String, StrName As String) As Integer
    Dim objFSO As Object, objFolder As Object, objFile As Object, i As Integer, iMax As Integer 'varDate As Variant, strName As String
     
        ' Specify the folder...
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    [/]...
    See more | Go to post

    Leave a comment:


  • How to find the latest file name with integer value in its name ?

    Hello everybody
    Suppose there is folder "A", Drive "C:\" with 15 pictures named like following
    P6V15-1.jpg
    P6V15-2.jpg
    P6V15-3.jpg
    P6V15-4.jpg
    P6V15-5.jpg
    P6V15-6.jpg
    P7V25-1.jpg
    P7V25-2.jpg
    P7V25-3.jpg
    P7V25-4.jpg
    P7V25-5.jpg
    P7V25-6.jpg
    P8V5-1.jpg
    P8V5-2.jpg
    P8V5-3.jpg

    In example above "P6V15-1.jpg"...
    See more | Go to post

  • Thanks Rabbit
    I changed code as under and it works fine
    Code:
    Function PostOpInvestigations() As String
    Dim msgStr As String, rstPostOpInvest as DAO.recordset
     Set rstPostOpInvest = CurrentDb.OpenRecordset("SELECT ID, InvestName FROM tblInvestigations WHERE Selection = True")
    If rstPostOpInvest.RecordCount <> 0 Then
     rstPostOpInvest.MoveFirst
      Do While Not rstPostOpInvest.EOF
       msgStr
    ...
    See more | Go to post

    Leave a comment:


  • Extracting the value from a field each record of table to populate a list

    Hello everybody
    I am struck at point while developing my patient database. I am sure it will be pretty simple thing but I am struck.
    I come to my question. I have a table that stores the name of Investigations that I choose for my patients. I want to populate a list of selected investigations via a loop but I could not. Here is the code I made so far.
    Code:
    Function PostOpInvestigations() As String
    Dim msgStr As String, rstPostOpInvest
    ...
    See more | Go to post

  • Yousaf Shah
    started a topic Undo in MS Access

    Undo in MS Access

    Hello everybody
    I have a question for which I have search net for last 3 hours but could not find answer.
    I have an entry form over which I have placed an 'undo' button with following code
    Code:
    Private sub cmdUndo_OnClcik()
    If Form.Dirty Then
     DoCmd.RunCommand acCmdUndo
    Else: Exit Sub
    End If
    End sub
    It works fine..
    Now I come to the question that I find answer of;
    When Its...
    See more | Go to post

  • Thanks zmbd
    I have found another simpler way. That if you press 'c' while in 'Print Preview', it takes you to 'Report View'.
    Anyways thanks very much for your concern.
    See more | Go to post

    Leave a comment:


  • Thank zmbd for response.
    I am using MS ACCESS 2010. I get back by right clicking on report border and then selecting report view.
    See more | Go to post

    Leave a comment:


  • How to switch back from report Print Preview to Report View via VBA ?

    Hello everybody.
    I am developing database for my patients. I have almost the needed stuff but now struck at report level. At the end of all required data entry, I want to give prescription to my patients in printed form. For that I have made a report that opens in 'Report view' as a pop-up window. On that report, name it as 'rptOPDTreatmen t', I have put a command button 'cmdPreview' that I use to open report in 'Print Preview'. Now I want...
    See more | Go to post

  • I have made only one change to function suggested by ADezii, that I have removed after 'and' in line 12 and 15 to make only one space on both sides of and... Rest its wonderful.
    See more | Go to post

    Leave a comment:


  • Thanks ADezii
    Its really cool and working fine...
    Thanks once again
    See more | Go to post

    Leave a comment:


  • How to replace last comma with 'and' or '&' in a string with multiple commas ?

    Hello everybody
    Thank you all for helping others.
    I have a very simple question that how can we replace only last comma with 'and' in string, which has got multiple commas?
    Suppose we have a sentence "I like Banana, Orange, Grapes, Mango in fruits". I have tried Replace() function but that put 'and' in place of every comma, which is fine if there are only two items. But I want that this sentence must be converted to...
    See more | Go to post

  • Yousaf Shah
    started a topic How to code a MsgBox correctly

    How to code a MsgBox correctly

    I am a surgeon and has made a database for my patient record keeping. I have got a form 'Basic History Examination Form' that should not be opened directly but through another form "Patient Biodata Form". For that, I put following code in on exit event of 1st control of form 'HistoryID'

    Code:
    Private Sub HistoryID_Exit(Cancel As Integer)
      If IsNull(Me.PatientIDPicker) Then
        MsgBox "Sorry...!" &
    ...
    See more | Go to post
    Last edited by TheSmileyCoder; Jun 26 '13, 09:51 PM. Reason: Fixed Code tags.

  • How can multiple selections from a combo become individual records ???

    Hello every body. I am developing my database for my patients. I have a control "TestName" on my "History" form, with which I select the names of laboratory tests required. When I select Multiple values they are displayed as a single record as "Blood CP;Urine RE;Cholesterol" after selecting "Blood CP", "Urine RE" and "Cholestero l" from Control "TestName". ...
    I want that...
    See more | Go to post

  • My first combo box is a bound combo box that populates its value from a query DrugList. It displays complete name of drug as "Cap Amoxil 250 mg" In "Cap Amoxil 250 mg" 'Cap' is the form of drug, 'Amoxil' is the Trade Name and '250 mg' is the strength. My second combo box has a table as RowSourse that have numeric values 2 through 20
    I want that first word in the 1st combo box should automatically be added to the value selected...
    See more | Go to post

    Leave a comment:


  • Yousaf Shah
    started a topic Code to Set Control Source for Bound ComboBox

    Code to Set Control Source for Bound ComboBox

    hello every body
    I want to know that is there a way to assign multiple InputMasks to a combo box. I have two combo boxes on same form. value in 1st combo box come from a query and may contain words like "Cap", "Tab", "Inj", "Ampules" etc. I want that 2nd combo box should have above mentioned values i.e "Cap", "Tab", "Inj", "Ampules" at the end of its value....
    See more | Go to post

  • I tried this code as
    Private Sub PositiveGPE_Fin dings_AfterUpda te()
    If IsNull(Me![PositiveGPE_Fin dings]) Then Exit Sub
    Me![Lymphnode_Gp].Enabled = (Me![PositiveGPE_Fin dings].Value = "Lymph Node")
    End Sub
    but it gives Run-time error '13' Type mismatch
    ...............
    what to do....?
    See more | Go to post

    Leave a comment:


  • How to hide field/s depending upon the value in other fields of same form in Access

    Hello everybody
    Actually I am a beginner with MS Access and want to make my own data base for my patients (as I am Surgeon by profession). I explain you my new query...
    Suppose we have two bound combo boxes, "PositiveGPE_Fi nding" and "Lymphnode_ Gp" respectively, in same form named "History". "PositiveGPE_Fi nding" combo box have value list with Multiple Selection enabled and Values; Pallor, Jaundice,...
    See more | Go to post
    Last edited by TheSmileyCoder; May 2 '11, 08:10 PM. Reason: Please remember to use [CODE] tags around your code.

  • how to make joined fields automatically filled on a form based on value in other?

    Hi everybody
    my question is very simple (hope so)
    I have two forms named PatientData and NOK. PatientData form is based on table PatientData with PatientID as primary key. NOK form is based on a Table NOK with its own primary key ID and has a field PatientID that is joined with PatientID in PatientData table. I have a cmdButton_NOK on form PatientData that is used to open the form NOK based on a macro with where condition [PatientID]=[Forms]![PatientsData]![PatientID]...
    See more | Go to post
No activity results to display
Show More
Working...