Search results

  1. A

    Button on form fills text box on subform

    OK, it turns out I was being a moron - I was referring to the subform by its name (ie. sfTransects_Distance) instead of as a subform of the main form (ie. Child11). Thanks for the reply though, Gasman!
  2. A

    Button on form fills text box on subform

    Hi all, This should be relatively simple to do; I've Googled, and tried Allen Browne's suggestions, but I just can't get it to work and I don't know why: I have a form [frmTransects] and a subform [sfTransects_Distance]. The form records details of a transect observing animals. The subform...
  3. A

    Calculating greatest common denominator

    Ace - thanks Mark. I'll use it for future reference! Cheers!
  4. A

    Calculating greatest common denominator

    OK, so I checked with people for who I'm setting this up; it's OK if the ratios aren't integers and are just rounded to 1 decimal place, so I've done that with: =Round(nz([malerats]/[femalerats],1),1) & " : 1" ...and they assure me that there will never be a case where there will be 0 male or...
  5. A

    Calculating greatest common denominator

    Yes, this is the other issue - we have to use integers, so I guess we'd have to round any decimals up or down. As for zeroes, how would we go about dealing with a division by zero error?
  6. A

    Calculating greatest common denominator

    Ok, sorry I wasn't clear. My end goal is to create a ratio using the values from the textboxes [malerats] and [femalerats] and put it in the textbox [ratratio], So if [malerats]=20 and [femalerats]=4, then [ratratio]=5:1
  7. A

    Calculating greatest common denominator

    Hi all, Yes, I was looking for a denominator in order to eventually go on to do a ratio; I know that repeated subtractions like this is probably a really clunky way to do things, but it's the best I could find with Google... (Excel has the GCD function, but I can't find an equivalent). I tried...
  8. A

    Calculating greatest common denominator

    Hi all, I'm trying to calculate the lowest common denominator between the values of two textboxes on a form, [malerats] and [femalerats]. I'm using a function called Denominator, below: Public Function Denominator(MaleRats As Long, FemaleRats As Long) As Long While MaleRats <> FemaleRats...
  9. A

    Populate unbound control using DLookup(?)

    Perfect! Thanks all of you for your help; DLookup was a winner after all! Ad
  10. A

    Populate unbound control using DLookup(?)

    OK, sorry to cause arguments. It may be that's I've explained myself poorly, for which I apologise. I've attached an example database to clarify. In frmCaptures, the user enters a date in txtCaptureDate. txtSeason should then display the relevant [SeasonID] (from tblSeason) by checking if the...
  11. A

    Populate unbound control using DLookup(?)

    Yep, still no joy...
  12. A

    Populate unbound control using DLookup(?)

    Thanks for the reply Arnel, I'm getting a sytax error in date in query expression Set rs = CurrentDb.OpenRecordset( _ "SELECT tblSeason.* FROM tblSeason WHERE " & _ "#" & Format(Me.textbox, "mm/dd/yyyy") & "# " & _ "Between tblSeason.[startdate] AND tblSeason.[enddate]") But I...
  13. A

    Populate unbound control using DLookup(?)

    Hi all, I need to enter a value into an unbound text box on a form (frmCaptures) from a table (tblSeason). tblSeason specifies a SeasonID (eg. "2017-2018") and the start and end dates for that season (e.g. the 2017-2018 season starts in June 1, 2017 and ends May 30, 2018). I need users to be...
  14. A

    Importing mulitiple .txt files into Access

    OK, so I now have the following, based mostly on Phillip's code; Private Sub cmdSelectFile_Click() Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogOpen) With fd .AllowMultiSelect = True If .Show Then For i = 1 To fd.SelectedItems.Count Me.txtFileName.Value =...
  15. A

    Importing from a text box containing submission from multiselect dialog box.

    Sorry, you've lost me... the import specification still works fine if I run that from the access interface. That's the specification "ImportWeather" in transfertext. Sorry if I'm being really stupid... I've been stuck on this for the last week and it's driving me up the wall! :banghead:
  16. A

    Importing from a text box containing submission from multiselect dialog box.

    OK, done... but now it won't accept the filename argument in transfertext...
  17. A

    Importing from a text box containing submission from multiselect dialog box.

    Ah, I see; Arnel, I'm getting a syntax error at
  18. A

    Importing from a text box containing submission from multiselect dialog box.

    Hi folks, This is a bit of a run-one from a previous post but I thought it was enough of a tangent to start a new thread. I'm using the following code to enter filepaths from a dialog box into a text box on a form, which then tells an import routine which file to import using the transfertext...
  19. A

    Importing mulitiple .txt files into Access

    Cracking bit of German electropop!
Top Bottom