[AccessD] From no longer loads records

Tina N Fields tinanfields at torchlake.com
Sat Dec 5 11:12:17 CST 2020


By golly, Stuart, after noodling on it for a while, I realized that is 
exactly what happened. I had opened the form from the "New Household" 
button, and went into design view, made a change and saved. Dang! Thanks 
again for thinking of it.

T

Tina Norris Fields
231-322-2787
tinanfields-at-torchlake-dot-com

On 11/15/2020 10:49 AM, Tina N Fields wrote:
> Thanks, Stuart. That is as good a guess as it can be. I'm just glad I 
> did find it and fix it. The Salvation Army chapter here is taking in 
> the entries right now and I needed to get that database fixed for them.
>
> Be well,
>
> T
>
> Tina Norris Fields
> 231-322-2787
> tinanfields-at-torchlake-dot-com
>
> On 11/14/2020 10:01 PM, Stuart McLachlan wrote:
>> As a WAG, you edited the form and changed the Default Open mode from 
>> Edit to Add by
>> accident.
>>
>> This would happen if you switch to design view when the form is in 
>> "Add mode" and you
>> make some design change and then save it. The Open mode will then 
>> have been saved as
>> "Add".
>>
>>
>> On 14 Nov 2020 at 17:47, Tina N Fields wrote:
>>
>>> Oh, crap! I just added the Data Mode to be Edit, and the record came
>>> up. Okay, why did this work before? Beats me and I would really like
>>> to know. Any ideas?
>>>
>>> T
>>>
>>> Tina Norris Fields
>>> 231-322-2787
>>> tinanfields-at-torchlake-dot-com
>>>
>>> On 11/14/2020 5:34 PM, Tina N Fields wrote:
>>>> Hi All,
>>>>
>>>> I have a mystery to solve. A database I have for the local Salvation
>>>> Army Christmas assistance program is suddenly giving me fits. Each
>>>> year some same families return for help. The folks at the SA assign
>>>> a family number to each family every year on the paper form they use
>>>> during the interview. It will not be the same number assigned to
>>>> them the previous year unless that happens by accident. I set up the
>>>> tblHouseholds to have a primary key that the user never sees, HH_ID,
>>>> as well as a field for the number the workers assign HH_FamCode. At
>>>> the end of the year, I remove all the info from the selection fields
>>>> for the household, including the family code. All the person records
>>>> within the family have PE_ID_HH as a foreign key as well as their
>>>> own primary key PE_ID, and these never change. Only things like what
>>>> pickup day and time are assigned and what programs they may have
>>>> selected are emptied from the records in the tblHouseholds. They
>>>> wanted to be able to search for a family that had come to them
>>>> before, so on the main form frm_Main, I have a combobox that lists
>>>> all family names and a button that opens the frmHouseholdInfo to the
>>>> record with the matching HH_ID, or at least it used to. Now, if I
>>>> select a family name from the combobox and click my button, it opens
>>>> the form frmHouseholdInfo as though I were creating a new record.
>>>> When I look into the properties, I see that it is filtered on the
>>>> correct HH_ID, but it does not display the record.
>>>>
>>>> I've tried working this with VBA in and Event Procedure and working
>>>> it with an embedded macro. What used to work is not working and I
>>>> don't know why.
>>>>
>>>> So, for the macro attached to the Click event of the btnOpenHH, it
>>>> goes like this:
>>>>
>>>> OpenForm
>>>>      Form Name  frmHouseholdInf
>>>>          View  Form
>>>>      Filter Name
>>>> Where Condition =="[HH_ID]="&[cbo_HH_ID]
>>>>      Data Mode
>>>> Window Mode  Normal
>>>>
>>>> This used to work.
>>>>
>>>> Switching to making an Event Procedure in VBA, I did this:
>>>>
>>>> Private Sub btnOpenHH_Click()
>>>>      DoCmd.OpenForm "frmHouseholdInfo", acNormal, , "[HH_ID]=" &
>>>> [cbo_HH_ID] End Sub
>>>>
>>>> Neither of these will load the record for the household, although
>>>> the form filter property says it's filtered on the correct HH_ID. I
>>>> get the form as though I had chosen Add as a data mode, although it
>>>> has the filter property set.
>>>>
>>>> Ideas?
>>>>
>>>> Thanks.
>>>> T
>>>>
>>> -- 
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> http://databaseadvisors.com/mailman/listinfo/accessd
>>> Website: http://www.databaseadvisors.com
>>
>>


More information about the AccessD mailing list