G
Guest
Hello,
I just can't seem to get the hang of this Access. I know how to do this in
MySQL and PHP, but Access is just different. I need to take a class, I have
a book, but it is of no help.
Here is what I need to do:
Combo box 1 has two choices:
1) Batch Number
2) Invoice Number
When one of these is selected Combo Box 2 should populate with either a list
of batch numbers and one choice of All Bathes or a list of invoice numbers
and one choice of All Invoices
Then, when one of these is selected then a button, which should be disabled
would become enabled and it will print the selected record(s).
I assume that it would be done like this:
Box 1 has an after_update in VBA code similar to
psuedo code:
if combo1="batch" then
run batch query and add option all batches
else
run invoice query and add option all invoices
end if
end sub
Combo 2 would have a after_update in VBA similar to:
psuedo code:
if combo2="all batches" then
search value="all"
else if combo2="all invoices" then
search value="all"
else
search value=me!combo2
end if
enable print button
end sub
code for print button:
psuedo code:
if combo1="batch" then
if combo2="all" then
run print batch all query
else
run print batch query
end if
else if combo1="invoice" then
if combo2="all" then
run print invoice all query
else
run print invoice query
end if
end if
end sub
Ok, so I think I have the basic strategy down, but I don't understand
creating queries with access. I also don't know how to make the button
enabled.
Thanks for any help,
Johnie Karr
Data Management Technologies
www.datamt.org
I just can't seem to get the hang of this Access. I know how to do this in
MySQL and PHP, but Access is just different. I need to take a class, I have
a book, but it is of no help.
Here is what I need to do:
Combo box 1 has two choices:
1) Batch Number
2) Invoice Number
When one of these is selected Combo Box 2 should populate with either a list
of batch numbers and one choice of All Bathes or a list of invoice numbers
and one choice of All Invoices
Then, when one of these is selected then a button, which should be disabled
would become enabled and it will print the selected record(s).
I assume that it would be done like this:
Box 1 has an after_update in VBA code similar to
psuedo code:
if combo1="batch" then
run batch query and add option all batches
else
run invoice query and add option all invoices
end if
end sub
Combo 2 would have a after_update in VBA similar to:
psuedo code:
if combo2="all batches" then
search value="all"
else if combo2="all invoices" then
search value="all"
else
search value=me!combo2
end if
enable print button
end sub
code for print button:
psuedo code:
if combo1="batch" then
if combo2="all" then
run print batch all query
else
run print batch query
end if
else if combo1="invoice" then
if combo2="all" then
run print invoice all query
else
run print invoice query
end if
end if
end sub
Ok, so I think I have the basic strategy down, but I don't understand
creating queries with access. I also don't know how to make the button
enabled.
Thanks for any help,
Johnie Karr
Data Management Technologies
www.datamt.org