Search results

  1. S

    Can anyone see the problem with this code?

    Hi The name of the data source doesn't matter - what DOES matter is that the fields in both match EXACTLY - name and data type. Can you strip out your data and post the file? I'll send you my e-mail address. It'll probably be quicker if I can look at your file. shay
  2. S

    Creating an unbound "go to" text box

    Try this... Docmd.GoToRecord acDataForm, YourFormName, acGoTo, Val(YourTextBox) I'd also suggest using a combo box populated with the available Issue Numbers rather than a text box; that way you won't have to check that a valid Issue Number has been entered. hth shay :cool:
  3. S

    dropdown to select other fields

    Why not leave your form with just the dropdown boxes required to identify the info you want and create a report with all the fields required to be printed. You can create a command button on the form to print the report. shay :cool:
  4. S

    coding a combo box contents

    Hi there Where are you specifying the rowsource? If it is in Properties, the query name shouldn't be in quotes. hth shay
  5. S

    Can anyone see the problem with this code?

    Steve I know that you said you've checked everything but something's still not quite right. Check the field data type in every table against the example that works. You are probably entering text into a numeric field or perhaps you haven't dimensioned your variables correctly in the code...
  6. S

    creating a button that updates a form

    Possible solution for you ... I created a table 'Payment numbers tbl' which contains fields PaymentNo and Assigned (Yes/No field set to No by default). Put the following code behind your form... Me.txtPaymentNo = DFirst("[PaymentNo]", "Payment Numbers tbl", "[Assigned]=No")...
  7. S

    Importing fields with text qualifiers

    Hi Do you have any control over the way the data is exported from the financial package? If you can, use ' as the text qualifier. Otherwise, I think you've got a problem! shay
  8. S

    Error Accessing File problem

    Hi there Don't have an answer but why not just delete whatever you've put in the On Click event of the form? shay
  9. S

    Can anyone see the problem with this code?

    Hi I cut and pasted the code into my db and it works. Check the names of your controls, tables and fields. If they are all correct try to work out where your error is occurring Try Set rst = CurrentDb.OpenRecordset("SELECT [HotelPrices tbl].[Price] FROM [HotelPrices tbl] " & _ "WHERE...
  10. S

    Change control button on focus

    Hi there I have seen an example of buttons changing colour but can't remember where. How about this idea: why not change the colour of the text on the button with focus? You could create two new procedures Sub HasGotFocus() Screen.ActiveControl.ForeColor = 255 End Sub Sub HasLostFocus()...
  11. S

    What is the correct setup for my tables

    Hi Not been in the office since Wednesday lunchtime so couldn't reply earlier. There is no problem with entering the box number 10 times as the number is just an identifier. If you were entering textual information for each box instead, then I would think a third table is needed. As you've...
  12. S

    Can anyone see the problem with this code?

    Morning Check the name of the room type combo box. It should either be called cmbRoomType or change the name in the code to your new name. shay :cool:
  13. S

    Can anyone see the problem with this code?

    I'm so pleased we've hit on a solution. The sub CalculatePrice should transport to your db - just change the names of the text boxes and tables as appropriate. Best of luck. shay
  14. S

    Can anyone see the problem with this code?

    Hi Replace your current CalculatePrice with this sub. Public Sub CalculatePrice() Dim TotalCost As Integer, ThisDate As String, NoDays As Integer, i As Integer, rst As Recordset MsgBox "Wants a " & Me.cmbRoomType & " room from " & Me.txtFromDate & " to " & Me.txtToDate...
  15. S

    Can anyone see the problem with this code?

    Brilliant news! I will abandon my new approach and see if we can get your current version working correctly. Watch this space!!! shay
  16. S

    Can anyone see the problem with this code?

    Open the form in Design mode. Check the RowSource property for cmbHotelName. It should say SELECT [Hotels tbl].HotelID, [Hotels tbl].HotelName from [Hotels tbl]; Check that Bound Column = 1, Column Count = 2 and Column Widths = 0cm; 4cm. Run it again. cmbHotelName should give the ID code. shay
  17. S

    What is the correct setup for my tables

    Why not ... Tbl 1 Contract number (pk) Contract details etc... Tbl 2 Contract number Box number (Why not use numeric - you can still start from 1 for each contract) Item number (Runs from 1 up to 10 for each box within a contract) Description The two tables would then be linked on...
  18. S

    Can anyone see the problem with this code?

    I cut and pasted all that code into the Db and it ran with no problems at all. Basically, even if you could get it to run, this code wouldn't solve your problem. What it does is select a price based on the 'From date', work out how many days the room is needed and multiplies the two numbers...
  19. S

    Export Query

    You don't say how the export is triggered but if (dcount("*", YourQuery) > 0 then export is one way to do it. shay :cool:
  20. S

    dcount + instr

    Try criteria = Instr(1, {NameOnForm}, left({NameInTable},3)) >0 shay :cool:
Back
Top Bottom