Search results

  1. VilaRestal

    Composite primary keys

    Thanks for getting us back on topic Earl. To create a composite key in Access 2007 (I forget about earlier versions and I think 2010 is the same): Open the table design. In the Design ribbon there is the Indexes button, click that. Enter a new Index name in the left column, select the first...
  2. VilaRestal

    Tying to compare dates.

    Those links don't work for me Whompa If it's not showing all the records it should then your filter is too strict in one way or another. Note what I said in #15: The OR had changed to AND. That will make a huge difference to the results it shows. If you haven't put that back, do so. If that's...
  3. VilaRestal

    Composite primary keys

    To quote the late great Sir Karl Popper: "When I speak of reason or rationalism, all I mean is the conviction that we can learn through criticism of our mistakes and errors, especially through criticism by others, and eventually also through self-criticism. A rationalist is simply someone for...
  4. VilaRestal

    RE: A Sorely Missed Feature (The UNRELATED posts)

    Re: A sorely missed feature WHAT!? I thought it was a fly on the wall documentary. Of course, every city is mostly full of decent people and has its fair share of yobs. Besides: you think scousers have an undeserved bad rep? I'm a brummy!
  5. VilaRestal

    RE: A Sorely Missed Feature (The UNRELATED posts)

    Re: A sorely missed feature True scousers say things like: "Eh! Eh! Calm down! Calm down!" and "You tellin me to calm down?" and "Yeah" and "Yeah?" and "They do though don't they though" (You Tube: Harry Enfield Scousers)
  6. VilaRestal

    Yes/No Combo's defaulting to 0 upon entry of field

    That's a problem with Access Yes/No fields. They store Null as 0 (No/False). The only way I know of is to change the data type to number (byte would do). Then the combobox would have row source type: value list row source: 0;No;1;Yes bound column: 1 allow value list edits: No column count: 2...
  7. VilaRestal

    Composite primary keys

    You mean: Set rs = CurrentDb.Recordsets(0) Again, not something I've ever needed to do. But yes, could be useful to know these peculiarities. Thanks for clearing it up Banana.
  8. VilaRestal

    Composite primary keys

    And it does :D
  9. VilaRestal

    Composite primary keys

    But anyway, indeed that shows under the hood what is going on with the tabledef variable. It doesn't hold open the CurrentDb reference in the same way that every other object does. Presumably: Dim tdf as TableDef With CurrentDb Set tdf = .TableDefs(0) Debug.Print tdf.Name End With would work
  10. VilaRestal

    Composite primary keys

    Shouldn't you Err.Clear before each test? Or the first time there's an Err then every If Err after will return true? Edit: Testing I get the impression On Error GoTo 0 does that. I prefer Err.Clear
  11. VilaRestal

    Adding a prompt to ask for value

    You create a query with a parameter (message). Something like: SELECT * FROM Table1 WHERE Field1 = [Please enter the record you wish to view here:] Then save that query and set it as the record source of the report. Change Table1 and Field1 to the correct table and field name. If the report...
  12. VilaRestal

    Composite primary keys

    It is fascinating to me though that Dim tdf As TableDef For Each tdf In CurrentDb.TableDefs MsgBox tdf.Name Next works but Dim tdf As TableDef Set tdf = CurrentDb.TableDefs(0) MsgBox tdf.Name doesn't. Some difference in how For Each and Set assigns tdf to the...
  13. VilaRestal

    Refer to a Recordset Variable by name

    I see. That's probably for the best. It would be very easy to get one or more VB errors for every record in the query when using Eval in it.
  14. VilaRestal

    Dropdown boxes - filtering alphabetically

    I thought you already had a combobox that showed a list of countries. The code does nothing to the rowsource of the combobox (the list behind it). Set that up as normal.
  15. VilaRestal

    Tying to compare dates.

    Zero length strings perhaps Try: FROM [Instrument DB] AS tA INNER JOIN [Instrument DB] AS tB ON tA.[Serial No#] = tB.[Serial No#] WHERE (((Abs(DateDiff('m',[tB].[PGI Date],[tA].[Close Out])))<4) AND ((tB.ID)<>[tA].[ID])) AND (tA.Notification)=[tB].[Notification]) AND...
  16. VilaRestal

    Prompt before closing a Dirty Form

    I think it's the saving of changes in the subforms the OP wants to undo Gemma.
  17. VilaRestal

    Local FE for each user - a discussion

    Ah yes, my mistake. I'm so used to packaging front ends I take for granted that their shortcuts don't automatically get their icon from the database. Having the shortcuts on the desktop with their own icons is not a problem though. (Again, so long as all the icons are in a standardised location...
  18. VilaRestal

    Local FE for each user - a discussion

    Definitely keep the FEs on the local HD. You can assign them icons in the Access Options - Current Database. (I think PixelFormer is a good freeware icon editor) Put all the icons on the local HD too in a standardised location and set the FE's icon from the local icon file (on a computer that...
  19. VilaRestal

    Prompt before closing a Dirty Form

    Yeah, sorry I was getting it mixed up with Cancelling Before Update when the form's closing. Undoing changes isn't a bug or a problem. If it's an issue with subforms then you're probably best off doing what Ken says - remove the close button and put your own on there. Shifting the focus to...
  20. VilaRestal

    Prompt before closing a Dirty Form

    That is a bug in Access. I think, you can get the behaviour you want with: Option Compare Database Option Explicit Private UndoOnClose As Boolean Private Sub Form_Current() UndoOnClose = False End Sub Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Dirty Then If...
Back
Top Bottom