Search results

  1. N

    Relationships Question

    Ok, if the store number is really unique, then I guess you can use that for a PK. Personally, I'm a friend of auto-number PKs, but there are those who don't like that. :) Inserting a foreign key into a table is really easy. Say, your main table PK is called StoreID [your store number]. It ought...
  2. N

    Set focus?

    Now that is an interesting idea. I don't think it would be practical in my case, however. Setting the focus to a particular control works well enough since it does scroll the form up. Not all the way, but 99 % of it. Not perfect, but acceptable.
  3. N

    Set focus?

    Never mind, I figured it out. :) On Current me.[control].setfocus
  4. N

    Relationships Question

    You establish a relationship between tables via the store number. But your database sounds a bit odd if you really have this key as a PK in several tables. What I would expect is to see it as a PK in one table, and maybe a foreign key in others. Then you wouldn't have to do anything about...
  5. N

    Set focus?

    Hello, I am using a command button on my form to start a new record. I would like that new record to show up in a way that the top part of the form is visible, and not the bottom half. I thought that if I set the focus to the first combo box on the form, I'd achieve my goal, but either I am...
  6. N

    Help with Un/hide

    I found a workaround - instead of checking for null in sfrmDisclosure's DisclosureDate field, I am now checking sfrmSpeakerCOI's COIID field. I don't even need to check for the presence of records anymore for this to work. I noticed that when there's no speaker in sfrmRSC-Speakers...
  7. N

    Another update query

    Got it! If anybody's interested, here's the code [I'm not an expert; I'm just modifying code somebody was kind enough to write for me :)] - Dim cmd As ADODB.Command Dim strSQL As String Set cmd = New ADODB.Command cmd.ActiveConnection = CurrentProject.Connection cmd.CommandType = adCmdText...
  8. N

    Another update query

    Oh, I know why it won't work - the operation would create 2 identical entries in another table, tblDisclosures, where SpeakerID and DisclosureDate together form the primary key. Hm, maybe I should first delete the records, and then append one for the "Canceled" speaker.
  9. N

    Another update query

    I can simplify my query, but it still works, or rather fails to work, the same way. UPDATE [tblRSC-Speakers] SET [tblRSC-Speakers].SpeakerID = 404 WHERE ((([tblRSC-Speakers].RSCID)=[forms]![frmRSC].[RSCID]));
  10. N

    Another update query

    Hello, This is my code: UPDATE tblSpeakers INNER JOIN [tblRSC-Speakers] ON tblSpeakers.SpeakerID = [tblRSC-Speakers].SpeakerID SET [tblRSC-Speakers].SpeakerID = 404 WHERE ((([tblRSC-Speakers].RSCID)=[forms]![frmRSC].[RSCID])); What I want it to do is take tblRSC-Speakers and change the...
  11. N

    Help with Un/hide

    Yes, I have a main form, and on it are several subforms, 3 of which are important for this: sfrmRSC-Speakers, sfrmDisclosures and sfrmSpeakerCOI. The first contains information about the speakers, and the other two related information. If there's no disclosure date, there's no COI information...
  12. N

    Help with Un/hide

    Now I'm getting "Error 2465: Application-defined or object-defined error", so I guess I put this in the wrong place. If TestOK Then If Me.Parent.sfrmDisclosures1.Form.RecordCount > 0 Then If Len(Forms!frmRSC!sfrmDisclosures1.Form!DisclosureDate & "") = 0 Then
  13. N

    Help with Un/hide

    DDate is on the main form; I only mentioned it for continuity though; I'm actually directly referencing the date field on the subform. But since DDate just mirrors that, I don't think it makes any difference. If Len(Forms!frmRSC!sfrmDisclosures1.Form!DisclosureDate & "") = 0 Then etc. I'm...
  14. N

    Help with Un/hide

    DDate gets its date information from a field that is based on a query. There is currently one date per speaker, but in the future, there will be more. I've been trying to use the max function to limit the dates in the query to the most recent ones, but that is creating problems with this code...
  15. N

    Relationships question

    Hm, or not. When there is no speaker, eg. in the case of a new records, I get error 2427: You entered an expression that has no value.
  16. N

    Survey table design, have searched require clarification.

    I don't understand how you cannot store the questions - how do you want to know what the answers mean without a question? But anyway, I believe you could and should keep your old design, especially since you want to do a lot of reporting and cross-referencing. Yes/No questions are essentially...
  17. N

    Relationships question

    Turns out my query had a problem, and then I forgot to update the name of the control from the original name to MaxOf... but after that I figured all that out, it's working. I feel a bit stupid now. :D
  18. N

    Relationships question

    Still, it's not working. I have two subforms side by side, which are linked. One is a continuous form that shows several records, and the other one is a single form. Clicking on a record in the continuous form updates the record in the single form [a date]. Some records in the continuous form...
  19. N

    Relationships question

    Ok, I think there's been a misunderstanding. I didn't want to list just the records without a date, I was trying to include them. As it turned out, my initial observation was wrong - Access does include records without a date, I had just looked up the wrong table where there are not any records...
  20. N

    Relationships question

    Ok, I am using the max function. But I have run into a problem - this function does not seem to include empty fields. But I have some instances where there is no date, and I need to show those as well. How can I do that?
Back
Top Bottom