Combo Box AfterUpdate coding question

H

Heidi

I have a form that I'm using to let a user remove someone from attendance for
a given date.

The combo box references dates from a table and what I want is, when the
user changes the date, all the following data (all the names of people
currently in attendance) will correspond to that date only. I know I have to
do VB coding for an afterupdate but i'm not sure what it is... Any help would
be appreciated!!!

Thanks!
 
T

Tom Wickerath

Hi Heidi,

If I understand you correctly, you want to use a combo box to find a record
so that you can then take further action. Does this help?

Combo box to find a record
http://www.access.qbuilt.com/html/find_a_record.html


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

I have a form that I'm using to let a user remove someone from attendance for
a given date.

The combo box references dates from a table and what I want is, when the
user changes the date, all the following data (all the names of people
currently in attendance) will correspond to that date only. I know I have to
do VB coding for an afterupdate but i'm not sure what it is... Any help would
be appreciated!!!

Thanks!
 
H

Heidi

Tom, that's exactly what I want to do but for some reason, that 3rd option
doesn't show up for me. For all I can tell, I'm following the correct
instructions - putting the combo in the form header, it's on wizard and I'm
using access 2002..... Is there any other reason I only get the first two
options and not the third?

Thanks!
 
H

Heidi

Quick clarification - I realize that the form has to be bound but the problem
is my dates are in one table and my names are in another - if i use a qry or
a select qry, it seems to negate the bound property of the query - is there a
way around this?
 
T

Tom Wickerath

Hi Heidi,

Did you see the paragraph I wrote directly underneath the first image? It
reads:

"If you only see the first two choices listed, then you are working with an
unbound form. A SQL statement in the form's RecordSource Property will not
provide the third option in the dialog window. You need to bind your form to
a saved TableDef or QueryDef object first, in order to be able to select the
third option."

If the form's recordsource starts with the SELECT keyword, then you need to
first enter the query builder for the form's recordsource (click on the
button with the three small dots when you select the recordsource) and then
save the query as a new object in your database. Once you are finished, you
can copy and paste the SQL statement back into the form's recordsouce, if you
don't want the extra query in your database.

Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Tom, that's exactly what I want to do but for some reason, that 3rd option
doesn't show up for me. For all I can tell, I'm following the correct
instructions - putting the combo in the form header, it's on wizard and I'm
using access 2002..... Is there any other reason I only get the first two
options and not the third?

Thanks!
__________________________________________

:

Hi Heidi,

If I understand you correctly, you want to use a combo box to find a record
so that you can then take further action. Does this help?

Combo box to find a record
http://www.access.qbuilt.com/html/find_a_record.html


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

I have a form that I'm using to let a user remove someone from attendance for
a given date.

The combo box references dates from a table and what I want is, when the
user changes the date, all the following data (all the names of people
currently in attendance) will correspond to that date only. I know I have to
do VB coding for an afterupdate but i'm not sure what it is... Any help would
be appreciated!!!

Thanks!
 
T

Tom Wickerath

I'm not understanding what you mean by "negate the bound property of the
query."

How are you currently linking these two tables (or are you linking them)?
Create a query that includes the dates from your first table, and the names
from your second table. Save this query as a new object in your database.
Base the form's recordset on this new query.

Tom
_______________________________________________

:

Quick clarification - I realize that the form has to be bound but the problem
is my dates are in one table and my names are in another - if i use a qry or
a select qry, it seems to negate the bound property of the query - is there a
way around this?
 
H

Heidi

Ok, I'm getting a little closer but still no cigar....I did this and can use
the combo box and it will pull only the records that correspond to that date,
HOWEVER - it adds a records to each of the dates that have no information and
so there are null entries in table now and also a number of blank rows in
the form for each date w/no info (one row for each null date).... I tried
switching around the relationship between the two tables in the query and it
won't find any records for the combo at that point. Any thoughts?
 
H

Heidi

My mistake, I meant the bound property of the form. Sorry. I was able to make
it work though with your previous instructions - it seemed that whenevery I
had anything other than a straight table, it wouldn't allow me to use that
third option. Now that part of it works, but as in the post I just made, i'm
having other issues.....
 
T

Tom Wickerath

Hi Heidi,

I need to leave for work now, so hopefully someone else will step in for the
other issues.


Tom
_______________________________________

:

My mistake, I meant the bound property of the form. Sorry. I was able to make
it work though with your previous instructions - it seemed that whenevery I
had anything other than a straight table, it wouldn't allow me to use that
third option. Now that part of it works, but as in the post I just made, i'm
having other issues.....
 
T

Tom Wickerath

Hi Heidi,

Are you any closer to solving this issue, since reporting it earlier this
morning?

Using the unbound combo box should not result in the addition or change of
any existing records. Is there any chance that your new combo box includes a
Control Source? It should not.

Tom
__________________________________________

:

Ok, I'm getting a little closer but still no cigar....I did this and can use
the combo box and it will pull only the records that correspond to that date,
HOWEVER - it adds a records to each of the dates that have no information and
so there are null entries in table now and also a number of blank rows in
the form for each date w/no info (one row for each null date).... I tried
switching around the relationship between the two tables in the query and it
won't find any records for the combo at that point. Any thoughts?
 
H

Heidi

Tom,

I haven't had any luck yet so if you do get a chance before or after work
again, your assistance would be much appreciated. Thanks a bunch!
 
T

Tom Wickerath

Hi Heidi,

I'd like to invite you to go ahead and send me a copy of your database. It
will be a lot easier for me to provide further assistance, if I can see what
you are working with. If your database contains any sensitive information,
then make a copy of it first, delete the sensitive information and/or convert
it into meaningless "dummy data". I only need enough data to clearly
demonstrate the issue at hand.

Then please compact the database (Tools > Database Utilities > Compact and
repair database), and add it to a .zip archive file. My slightly obfuscated
e-mail address is:

QWaos168@XScom cast. Dnet (<--Remove all capitalized letters and spaces).

You should have a total of 18 characters in the decoded address.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________


:

Tom,

I haven't had any luck yet so if you do get a chance before or after work
again, your assistance would be much appreciated. Thanks a bunch!
 
Top