Search results

  1. S

    SQL statement error

    Hi All I am trying to execute the following SELECT statement on my form but getting error: sql = "SELECT DoctorsID,AppointDate,AppointTime FROM qrySubformAppoints WHERE DoctorsID=" & Me.ID & _ "AND AppointDate=#" & Me.txtAppointDate & "#;" I would be grateful if can help...
  2. S

    Solved After update Combo box

    Hi All I have following VBA code on Combo box after update but it does not work and showing message syntax error: Private Sub cboTransaction_AfterUpdate() Dim SQL As String SQL = "Select Transaction.[ClientID], Transaction.[MatterID], Transaction.[TrxDate], Transaction.[TrxMode]...
  3. S

    How to show Debit and Credit amount based on account type

    Hi All I have a table with following fields: MatterID, ClientID, TransactionID, Date, TransactionType, AccountType, Amount_debit, Amount_credit. What I want to achieve is if (AccountType is = Office Account) then Amount_debit and Amount_credit should show under the title of Office Account...
  4. S

    Solved Open Form on double click

    Dear All Double click on list box I am trying to open a form for particular record. Although form gets open but without any data (blank). I am using the following code: Private Sub lstMatter_DblClick(Cancel As Integer) DoCmd.OpenForm "frmClientMatter", , , "[ClientID]=" & Me.lstMatter & " and...
  5. S

    Open a form based on meeting two criteria ID

    Hi All I am trying to open a form with following code: DoCmd.OpenForm "frmClientMatter" ,,,"[ClientID]=" & Me. ClientID &"'"& and "[MatterID]=" & Me.MatterID But code does not work. Any help suggestion will be much appreciated. A Munir Please note both (ClientID and MatterID) are numeric...
  6. S

    Syntax error on date field

    Hi All I am trying the following line of code: strCriteria = "[MatterDate] Between " & Format(Me.txtDateFrom, "\#dd\/mm\/yyyy\#) & " And " & Format(Me.txtDateTo, "\#dd\/mm\/yyyy\#") But getting Syntax error message. Will much appreciate if someone can help to to sort it out. Many thanks
  7. S

    Solved Filter the form based on value selected from Combo Box

    Hi All I am trying to display/show records on my continuous form based on the value selected from combo box. However, when I run the form and click on combo box first it asks me for parameter value and then shows that value in combo box instead of showing Customer Type. When I select each value...
  8. S

    How to display logged in user Name and Role on main form from a table

    Hi All I have a users table in access which holds user’s login name, password, and user type like(Administrator, data entry etc...). What I want to achieve is to display current ms access user’s login name and user type on my main. I tried (=get current user()) but it returns widow login user...
  9. S

    Filtering List Box Alphabetically

    Hi All I m trying to filter the records "Alphabetically" based on Tab Selection/Change. However it does not work at all, can someone look at attached file and suggest a solution? Your help will be much appreciated.
  10. S

    Record Filter Buttons do not work

    Hi All I m trying to to sort the records "Ascending & Descending" based on click of a button on listbox. However it does not work at all, can someone look at attached file and suggest a solution. Please note that "ClientID field" in tblClient is autonumber I am not sure whether that is causing...
  11. S

    Opening a form, showing a specific record based on the selection in a list box

    Hi All, I have a little issue. I am trying to open a form, showing a specific record based on the selection in a list box. I am using the following code and getting "mismatch" error: DoCmd.OpenForm "frmClients", , , _ "[tblClient.ClientID]=" & "'" & Me.lstSearch.Column(0) & "'" The...
  12. S

    Need help to Self join a table

    A table in my database has following fields: ClientID, MatterID, TitleNo all three fields are compound key. Some time the same MatterID can have more than one TitleNo in which case they need to be displayed in a row on a report rather than as a two different records. I am trying to work it...
  13. S

    How to combine two different tables data in into a single report or query

    I have three tables in my database with following details: ClientMain ClientMatter AdditionalClient PK ClientID PK MatterID PK. ClientID FirstName PK ClientID...
  14. S

    How to capture database user name and time stamp in a table.

    Hi All, How can I capture the user name, date modified and time stamp in other tables from userlogin table which as users log in details?
  15. S

    Passing value from one form to another and generate unique matter id

    Hello everyone Let me first explain what I want to achieve? I have two different forms based on tables 'Client' and 'Matters'. Client table has the following fields: 1-ClientID (primary key) 2-FirstName etc... Whereas the Matter table has the following fields: 1-MatterID 2-ClientID...
  16. S

    Generate Next Number

    Hi Everyone, I have two tables, Client and Matters. Based on those two table I have two Forms Client and Matters. There is a button on client form when I clik this button it open up the matter form with ClientID. What I want to achieve is when it open matter form like it copies clientID at the...
  17. S

    Data type mismatch in criteria expression

    Can someone check and advise why I'm getting this message. Thankx in advance Private Sub Form_BeforeInsert(Cancel As Integer) Dim db As Database Dim LSQL As String Dim Lrs As DAO.Recordset Set db = CurrentDb()...
  18. S

    Cannot execute s select Query

    Hi all! Can someone view the following qury and advse where I'm wrong cuz when I execute query I'm getting the above message. Private Sub Form_BeforeInsert(Cancel As Integer) Set DB = CurrentDb DB.Execute "SELECT max(tblClientMatter.MatterID) + 1 FROM [tblClientMatter] WHERE " _ & "...
  19. S

    Help needed to Generate Next Number

    Hi Everyone, I have two tables, Client and Matters. Based on those two table I have two Forms Client and Matters. There is a button on client form when I clik this button it open up the matter form with ClientID. What I want to achieve is when it open matter form like it copies clientID at the...
Top Bottom