Search results

  1. J

    iif statement in query criteria

    I have used the solution for this posted by Jon K, but actually when I have to handle multiple search fields and I want to allow the user to leave them blank to show all the records I rather build the SQL expression by code and pass it to the Qry. By this way I can trap the null value if the box...
  2. J

    Find unmatched query and looping

    Hello Adam! You are very welcome. I'm glad I could help you. You know that if you have changed the v_Beds field to be Integer you can remove the quotation marks around BedroomsNo from this part of the code: strWhere = strWhere & " AND tblVillas.v_Beds = '" & BedroomsNo & "'" So it becomes...
  3. J

    Concatenation problem

    You are missing three ampersands the ones are in bold and red. Me![txtBody].Value = "Dear " & strName & "This Email is to notify you that you have received grade point " & lstSelectContacts.Column(2, 0) & "in " & Me!cmbModules.Value have a nice day. Cheers!
  4. J

    Find unmatched query and looping

    Hello again Adam! I think I got exactly what you need in the attached db. I have changed some things: - I realize this morning that the criteria to get the bookings between the dates should be like this: WHERE ((b_Date <= #7/14/2009#) AND b_FinalDate >= #6/30/2009#)) -I also changed the name of...
  5. J

    Find unmatched query and looping

    Ok Adam!, so I think that other code worked just fine. And, what I have learned so far is that everything is possible my friend, even if the so called experts say some times its not... lol. Just let me take a look at it. I may post it later because I have to get some sleep tonight; I have had so...
  6. J

    Copy data from one table to another

    I think your code should look something like this: Dim srtQry1 As String, srtQry2 As String strQry1 = "INSERT INTO Order_Line (OrderNo, ProductID, Qty, Price) " & _ "SELECT OrderNo, ProductID, Qty, Price " & _ "FROM Import_Order_Lines;" strQry2 = "INSERT INTO Order...
  7. J

    Find unmatched query and looping

    I just finished commenting the code out, I'm posting it here so it would be useful for someone else. The answer for your question will be at the end: '---Variable declarations --- some variables have been leave without a type so they are variant as default '---because by being variant thay can...
  8. J

    Find unmatched query and looping

    Look at the code in the button a created in the form called search, the values are being passed via VBA to the query. If you change the values Date From and Weeks in the frmSearchProperty the values in the Qry will change because it's being building by code. That's the way I like to do this...
  9. J

    New Access World Forums VIP Group

    Hey!!.. every one is celebrating here, I must do so also. Congratulations VIPs, I am real new here, but I bet you have done a real good work to be listed within this group. I hope I will see you around!... I'm enjoying the forum. Cheers!!!
  10. J

    Find unmatched query and looping

    Hello adambedford! Take a look at the button I added to the form frmSearchProperty. I created I new query that selects all the booking that have been done and calculate the final date for every booking by adding the number of weeks to every booking date, I called it allBookings. Then I build a...
  11. J

    Static variable is not incrementing the values

    I will be around, that's for sure!.. Cheers!
  12. J

    Query results in TextBox

    It has something to be with type of the serial number, I was assuming it is a string so I declared the variable as a string. You cannot pass a null value to this variable, and I think this is why it's giving you that error. Or if you know it's not a string change the type in the declaration or...
  13. J

    Query results in TextBox

    I'm sorry I copied it from a piece of code I have in one project and I forgot to change the name of the RecordSet. So, instead of: With FieldsRst .FindFirst Criteria TrackerNo = .Fields("Tracker").value end With It should be: With TestRecordset .FindFirst Criteria TrackerNo =...
  14. J

    Static variable is not incrementing the values

    Hahahahahaha!!... I couldn't avoid laughing about it. Pedantic!, I thought Boblarson was being pedantic. I have done projects where I used temporary dummy tables to build dynamical reports (where the number of columns, and the name of them can change), so I just add or delete the columns as...
  15. J

    Find unmatched query and looping

    Hello Adambedford! I'm sorry that English is not my first language and I'm finding hard to understand what you are trying to do. I might be able to help you with the query that you are trying to build if I could understand it...lol. If you can post one example that shows what you are trying to...
  16. J

    Custom error message

    If you follow pbaldy suggestion your code should look like this: Private Sub Command47_Click() On Error GoTo Err_Command47_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmProjectMaster" If IsNull(Me![StartCombo01]) Then MsgBox "Please choose an item" Else...
  17. J

    Import XML into a table?

    Hello chris-uk-la! I'm setting up an information database about plants, so I have a bunch of XML files that I will use for a web site and I created an application in MS Access 97 to manipulate the XML Files. So I have some functions I have written to make my life easier, and I hope you will find...
  18. J

    Recordset

    Hello Woftysofty! I'm glad you will give to my advice a try. Post back if it works or not. Have a good day. Cheers!!
  19. J

    Recordset

    I don't see the point either! But if what you want is to hide the elements on the form if the value of the control exists in you RecordSet. You should try using: rsContactsList.Find "MyColumnName = '" & Me.Contact_Name.Value & "'" And pass a True value to a boolean variable if the record was...
  20. J

    Query results in TextBox

    Hello psuplat! What I would do to achieve what you want to do, is to open a recordset of the table "Test", search the value there and then retrieve it into the Tracker_No textbox. I wrote the code for you and I think it should work without problems, but if it doesn't work just post back and I...
Back
Top Bottom