Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: MajP
  • Order by date
  1. MajP

    Referencing a subform

    Even if you fix the subform reference, this will not work. No idea what you are trying, but it makes no sense. As far as the reference. Forms is a collection or the open forms. A collection has items in it. An item is not a property. However controls on a form are both properties and items...
  2. MajP

    VBA Recordset SQL returns up to 4 columns (how to identify if column 4 exists)

    No. Imagine it returns 2 fields. AssociateID and 2017. The count is 2 the index you care about is 1. So If rs.fields.count > 1 then Me!txtYear1 = rs(1).Name Me!txtValue1 = rs(1).value then on your next when you need to check if if rs.fields.count > 2 Me!txtYear2 = rs(2).Name...
  3. MajP

    VBA Recordset SQL returns up to 4 columns (how to identify if column 4 exists)

    you just need to check the count of the fields. if you are looking for RS(1) you need more than one field (2 fields) if RS.fields.count > yourIndex then But I can shorten all of your code with that logic Do Until rs.EOF = True for I = 1 to rs.fields.count - 1...
  4. MajP

    Questions about Using VBA

    http://www.cpearson.com/excel/vbaarrays.htm
  5. MajP

    Hello, I have been using the gre

    After reviewing this, I think my XIRR function handles the negative rates of return OK. I think where it bombs out are rates with a large magnitude over 100%. I think what happens is in the code you do Payments(i) / ((1 + Rate) ^ TimeInvested). Since time is in days and a large number, if the...
  6. MajP

    Hello, I have been using the gre

    FYI, on my version code I get a solution for your data. However, the solution is -0.699 no -.66. I did it in Excel and that is the correct number. So do not know what the issue is.
  7. MajP

    Hello, I have been using the gre

    There are two different things here. The first time I wrote the code for Access was simply to allow you to store your data in Access and run the XIRR excel function. So it creates a recordset for a specific cashflow and puts the dates and payments into arrays. Then it simply calls the Excel...
  8. MajP

    Hello, I have been using the gre

    Are you referring to this thread705-1740838 thread705-1778232 If so, there could be lots of reasons. I do not know how the Excel function really works. I coded the solution by using Newtons method to find the roots of the polynomial. When I wrote the code I had never heard of the XIRR or...
  9. MajP

    Creating tables and relationships for new database

    TblEmployee EmployeeID 'PK other employee fields tblFunctionalArea FunctionalAreaID ' PK Other functional Area Fields tblClassification ClassificationID ' PK Other classification fields 'I am assuming that there are shared classifications per function so that it is many to many...
  10. MajP

    Tab Control Will Not Embed Another Tab Control

    Are you sure you have done this before? AFAIK that is not possible. I do not have Access here to verify. You can put a subform on a tab with a tab control in the subform thus giving the appearance and potentially achieving the same results. What are you trying to do? That sounds like a very...
  11. MajP

    Attendance Control Public v5xx

    My work was mainly on the calendar control and year form. Oxicottin did the work on the other forms and reports. When he opens the form to edit/add an employees bought vacation he opens to that employee. The problem is there is nothing to set the employee id for new records. One solution is...
  12. MajP

    Attendance Control Public v5xx

    In the Year View calendar, I set the label of the 12 subform instances sFrmJan.LblMonth.Caption = "January" sFrmFeb.LblMonth.Caption = "February" sFrmMar.LblMonth.Caption = "March" sFrmApr.LblMonth.Caption = "April" sFrmMay.LblMonth.Caption = "May"...
  13. MajP

    Attendance Control Public v5xx

    I wrote this code. When I wrote it I was thinking a US format. MM/DD/YYYY. I did not account for European format DD/MM/YYYY. That tends to be the biggest issue.
  14. MajP

    Increment Change On Invoice Number?

    Not sure what that means. Can you take a screen shot?
  15. MajP

    Increment Change On Invoice Number?

    Is there an error message? Does qryAddSequence contain all of the records? Does it hang or just kick out?
  16. MajP

    More then one day's leave

    It would be easy. The way it is set up now when you click on a day that day gets entered as the start and end day. You would then add another control to the input form like outlook to save the start and end date. As it is currently set up there is no handling of multi day events so you would...
  17. MajP

    Turn one to many relationship into single records

    This is a pretty resource expensive query. I would export your results into a table. Just turn your query into a make table query. I would store just the concatenated value and the PK.
  18. MajP

    Turn one to many relationship into single records

    untested Dim db As DAO.Database Dim rs As DAO.Recordset Dim strSql As String Dim strConcat As String 'build return string dim strName as string dim strMeasure as string dim strDesc as string strSql = "SELECT roomname, roommeasure, roomdes FROM PropertySalesRooms...
  19. MajP

    Turn one to many relationship into single records

    Here is a hardwired stripped down version of the code. to use in query select concatenate([Prop_Link_ID]). This is untested. Function Concatenate(PropID as long) As string ' Created by Duane Hookom, 2003 ' Modified 6/21/2018 to hardwire ' to use in query select...
  20. MajP

    Turn one to many relationship into single records

    Duane, Remember the OP wants to concatenate the child records of two fields not one field. ROOMS TABLE ID LINK ROOM DESCRIPTION 1234 Lounge Good Size 1234 Kitchen Very Modern 1234 Bedroom Good Size OP wants Lounge Good Size, Kitchen Very Modern,.... If...

Part and Inventory Search

Back
Top