Search results

  1. M

    incrementing number

    Hi Greg If using a MakeTable query I would have thought that autonumber would be ok since as I understand it if the query finds there is already a table of that name it deletes it and creates a new instance of it. If so, then autonumber ought to re-start from scratch. If this doesn't work, then...
  2. M

    transfer data from an excel soreadsheet to an access database to show in report!

    Hi I had to do similar and this is how I did it. May not be neatest but it works. The code I use is Private Sub cmdCpImpWkData_Click() On Error GoTo Err_cmdCpImpWkData_Click Dim cnn As ADODB.Connection Dim strSQL As String Dim strPath1 As String Dim strPath2 As String '...
  3. M

    ADO or DAO - I am confused

    Hi About three years ago when I started doing VBA I got a drift that ADO was the way to go so have very gradually worked up my ADO skills - still not that high but with help from you guys I get by. I recall seeing somewhere that Microsoft are moving back to DAO being default in next version of...
  4. M

    Compile Error: Procedure too large.

    Hi I had a similar problem but with less code than you have here. I resolved it by migrating some of the code off to other procedures and in my case it worked. It did cause me a big headache though. It may be you can move some of the calculations off into modules and then call them. Good luck...
  5. M

    Runtime error 2108

    Hi I have put some validation code in the BeforeUpdate event of a textbox, and the code is If IsNull(Me.txtEndT) Or Me.txtEndT = "" Then MsgBox "You must enter an end time for the activity", vbOKOnly, "Data validation" Me.txtEndT.SetFocus Exit Sub End If...
  6. M

    Cancelled previous operation error

    That did the trick Peter Thanks very much I will try hard to remember but find these bits fall out of my memory much quicker than they go in! Best wishes
  7. M

    Cancelled previous operation error

    Hi I am trying to use DLookup to identify current record details and I am using varRegister = DLookup("[lngTsin]", "dbo_tsin", "[strEmp] = " & Me.cboStaff & " And [lngWeek] = '" & Me.cboWeekNo & "'") I keep getting a "You have cancelled previous operation" error. I have narrowed it down to...
  8. M

    Help Needed With Database

    Hi CARE - Download this zip to a different location or rename it since I have made amendments and additions to it!!! Hope this helps a little. I have built a booking form for you - its not pretty but has the beginnings of functionality and hopefully will help you to learn. There is some data...
  9. M

    Refreshing combo list

    Thanks guys Appreciate the help and the sample was really easy to follow. Like most things, simple when you can see the way. I also like the dialog idea so will try to incorporate that too. Thanks again Best wishes
  10. M

    Help Needed With Database

    Hi The query becomes the record source for the form. If you click on New Form you get a pull down box to select where the records come from. Select your query and click on design view and then it will let you drag fields onto the form. As far as ratings go, if there is a matching record in...
  11. M

    Help Needed With Database

    Hi As a starter for 10 you need to devise a query to drive the form. The query should draw all relevant data from the various tables. I think you need to look at a range of forms to do the differing activities and you need separate queries to drive each form. Can any one cottage have more than...
  12. M

    Refreshing combo list

    Hi Thanks for the replies. I am trying to get my head round this. I do not close the original form with the combo boxes in since most fields are unbound so if I close I lose the entries (well I could save them as variables I suppose). The idea I work on is the original form stays open and the...
  13. M

    Refreshing combo list

    Hi Need an elegant solution which probably everyone but me knows! With my combo boxes I limit to list so as to control content. In some cases there is a genuine need to add new content so I put a button alongside and allow entry of new content. This allows me to log and validate the data before...
  14. M

    Congrats to Rural Guy - 2000 Posts

    Must be something to do with the rarified air in the Rockies! Well done
  15. M

    Weekdays...

    Hi Probably an easier way but first thought would be to get the day of the week - use DatePart - for the intervening days and then add up those days with values 1 (Sunday) and 7 (Saturday) Any help? I suspect there is a better way but this might get you started. Good luck
  16. M

    Must fill in textbox

    Hi If you go into form design and then hit the properties button. Click on the command button and select the event tab. You should see an event in the OnClick property of the button. Open this up (clic on the little box with three dots) and you will get the code. Insert the code after any Dim...
  17. M

    Must fill in textbox

    Hi Try If IsNull(Me.textbox) or Me.textbox = "" Then MsgBox "You must complete textbox.", vbOkOnly, "Data required" Me.textbox.SetFocus Exit Sub End If That works for me. Good luck
  18. M

    Schedule next appointment automaticly

    It's something like DateAdd("yyyy", 1, [Start]) Might need to play with it since I think the interval is "yyyy" HTH Good luck
  19. M

    Dlookup syntax

    Got it in one Cue massed Scotsmen and women all under the influence of uisge beath (OK water of life and since this is Scotland I guess you can work that one out!) and other alcoholic beverages. And Edinburgh currently proclaiming itself the global centre of Hogmanay. Celebrations are starting...
  20. M

    Dlookup syntax

    Oops .. Apologies I didn't copy it all across I have done so now and it works Thanks a million Will drink a dram in your honour at Hogmanay Come to that I will perhaps drink a lot of drams!!
Back
Top Bottom