Recent content by RSIboy

  1. R

    Handling website Hyperlinks on form ('Address' is blank)

    Further apologies - I have this working now! (I think it was missing a "www." from the actual record). More generally what is the recommended way of dealing with a url field on a form? Rather than a button, would it be better to put this code in the 'On click' event of the actual field on the...
  2. R

    Handling website Hyperlinks on form ('Address' is blank)

    Thanks Simon Apologies for not fully understanding you.... how/when would I call the function? I tried adding a button to the form, to the side of the field with the following Private Sub WebBtn_Click() With CodeContextObject Dim WebLink As String WebLink = "http://" &...
  3. R

    Handling website Hyperlinks on form ('Address' is blank)

    Hi Apologies if this has been covered before, but a quick search didn’t bring up any solutions…. I have a customer table with name/address etc, together with a url field. Currently this is set to a datatype of Hyperlink. I then have a customer form that displays the underlying records, and...
  4. R

    Using Variable in Query Criteria?

    Hehe... Guilty as charged!! My sincere apologies Brian - I hadn't tried your solution. I didn't have the time to try all the suggestions when I first glanced at the replies, and didn't understand that the WHERE clause could be phrased like that (I'm still very much a...
  5. R

    Using Variable in Query Criteria?

    Wow! Thank you all for your prompt replies. MStef - nice one! That is exactly the result I am trying to achieve. I'll see if I can transpose your solution to my database... Brian, apologies if I havn't explained myself fully - it would be ideal if the query could be written in SQL as a WHERE...
  6. R

    Using Variable in Query Criteria?

    I have a table with a primary key of 'statusID' that the checkboxes relates to. If checkbox 1 is selected (but not checkbox 2) then I need the criteria statusID 4 If checkbox 2 is selected (but not checkbox 1) then I need the criteria statusID <> 4 If both are selected, then I have no...
  7. R

    Using Variable in Query Criteria?

    Hi I have a form with two checkboxes; depending on whether one/both/none are ticked, I need the criteria of a query to be one of: 4 Is Not 4 * I understand that that I can store the chosen option above in a hidden textbox (say, txtbox1) on the form, but then how do I pass the contents to my...
  8. R

    Code to write Access fields into Excel cells?

    Wow! - Cheers for the speedy response! I've got it working - just one small question... I'm trying to leave the spreadsheet visible, for further editing... I've tried the line xlSht.Visible = True and xlSht.Visible = xlSheetVisible neither of which return an error, but don't do anything! I...
  9. R

    Code to write Access fields into Excel cells?

    Thanks to some marvellous help from you guys, I have been able to import the fields in an Excel questionnaire into an Access table. I now need to populate an Excel 'template' spreadsheet with some of the Access fields. I have been able to make my database write standard letters in Word...
  10. R

    Code to read Excel cells into Access table?

    Thanks very much! I'll give it a go... is it possible to name the range (or cell) in Excel, and then refer to the Named Range in the VBA? That way, if the layout of the Excel form changed, all I would have to do is re-name the ranges... Thanks again
  11. R

    Code to read Excel cells into Access table?

    Hi I receive a completed questionnaire as an Excel file. I have a smattering of VBA - how difficult is it to write some code which would take an Excel file and read the value of specific cells into an Access table? e.g in English: open file C:\questions.xls tblAnswer.answer1 = cell D5...
  12. R

    Help on query - customers and *last order only*?

    Hi I have a database with Customers and Orders and want to write a query that will list each customer and only their last order. For simplicity, say I have tblCustomer (CustomerID, Customer Name) and tblOrder(OrderID, Customer ID, OrderDate, OrderDescription) I want the query to return...
  13. R

    Button Press enters a (calculated) figure on form?

    Thanks again SJ - you're not going to let me implement anything morally incorrect (from a database viewpoint) are you :) !! I was trying to simplify my problem for the sake of explanation, and hence used 'sales and commission'. In our specific business situation, we are commercial brokers...
  14. R

    Button Press enters a (calculated) figure on form?

    Sorry SJ... All I meant was what is wrong with the syntax of the line: [Table].[Field] = [Table].[AnotherField] * [constant] It's one of those situations where I did a 2-day VBA course and *loved* it - gave me the opportunity to drastically improve our [very small] company's database...
  15. R

    Button Press enters a (calculated) figure on form?

    Thanks for the prompt reply SJ - I will have to digest.... ;-) Just for reference, could you clarify what is wrong with the single line - (to change a field to a different value on the form) Cheers
Back
Top Bottom