[AccessD] Looking for easy form solution

Stuart McLachlan stuart at lexacorp.com.pg
Sat Oct 24 19:58:19 CDT 2015


I've done similar on many occassions:

An unbound form with a multi-select listbox,
combobox with list of flocks/herds, appropriate fields for treatment details and a Go button.

1.  User selects flock/herd in Combobox:
Populate the listbox with the appropriate animals/fowls 
Set all rows of the listbox to selected.

2.  User deselects animals/birds as necessary using Ctrl +Click. (You can also have a couple 
of buttons to "Select All" and "Deslect All" beside the list). 

3.  User enters treatment details.

4.  User clicks "Go" button.
Step through selected items in listbox and record the treatment details about each one in 
turn.

-- 
Stuart



On 24 Oct 2015 at 15:37, Rocky Smolin wrote:

> I always liked a few lines of code to do something myself.
> 
> What was in strFilter?
> 
> r 
> 
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf
> Of FW Salato Center Sent: Saturday, October 24, 2015 1:09 PM To:
> Access Developers discussion and problem solving Subject: Re:
> [AccessD] Looking for easy form solution
> 
> I was totally abusing the whole thing -- I'm such a ditz. You said it,
> but it didn't quite connect. Setting the Value property in code only
> changes the first record instead of all of them because of course it's
> the selected record. 
> 
> If I rely on the easy way -- the Yes/No at the table level (bound),
> unselecting a record will change it at the table level, which is just
> more trouble than it's worth. 
> 
> I should've gone the Recordset method in the first place. Talking in
> SQL has always come easier to me anyway. 
> 
> <sigh> 
> 
> It's raining here and it's cold so I'm sure that played some measure
> in my calamity. :) Sounds better than admitting I've forgotten
> everything I knew and that I'm no longer competent in Access. That
> hurts. 
> 
> Susan H. 
> 
> Rocky, I did. 
> 
> First, I tried to set the default value at the form level. When you
> open the form without filtering, the checkbox controls are selected.
> When I open the form with a filter, they aren't. So, I tried setting
> them after opening -- still doesn't work. No error, it just doesn't do
> anything. 
> 
>   DoCmd.OpenForm "Medical Update by Species", , , strFilter
>   Forms![Medical Update by Species]!booSelect.DefaultValue = -1
> 
> Susan H. 
> 
> 
> Make the default value in the table False.  You may have to run a
> quick update query one time to set the value of the added field to
> False in  the existing records.  But all other records which are added
> should set that field to false as default. 
> 
> r
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> 
> -- 
> 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