Many Access 2000 questions

  • Thread starter Thread starter Newsgroups
  • Start date Start date
N

Newsgroups

I have a simple Home Inventory database within Access 2000. I'm looking to
achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and simultaneously,
within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless I
click the Arrow button itself. Can I tell the drop menu to open when clicked
anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the item
as a gift, then obviously, there's nothing to populate the Price field. Can
I tell the Price field to "gray out" or "become inactive" when the Place
Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area, rather
than the text within the box?

5) When loading a database, is there any way to omit displaying the opening
Access menu screen - and display just the form entry screen itself - or must
Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a variety of
bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
1) Create a query that sorts the data in the order you want, and use the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place Purchased,
put code along the lines of Me!Price.Enabled = (Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the textbox.
 
Here is what I can help with:

Question 3: The simple answer, Yes you can do that. You will need to
use either a macro or VBA code to grey-out the price field after the
'Place Purchased' drop-down is updated when the selection is 'gift'.

Question 4: I dont know if there is a automatic way to center that
text box in the header area, however with using some simple math you
can accomplish this. what is the total width of your form? Cut that
value in half and you have the center of your form. Now what is the
width of your text box? Lets say 1 inch for this example, now just
place the text box a half inch to the left of (half the width of your
form). The text box is now in the middle of your header.

Question 5: Go to Tools>Startup at the top of your Access window. Now
under the "Display Form/Page" drop-down select the form you want to
display upon opening the database. Also uncheck "Display Database
Window". This should get it to open in the manner you want. Something
else you'll need to know now. When you need to bypass these startup
options (i.e. make changes or updates) you will have to hold the left
shift key while opening the database to get the database window to open
and bypass opening the default form you selected.
 
Douglas,

Thank you for the prompt response! However, I still seem to be having some
problems.

1) Sort ascending by Category, then by Item Name. Would you please explain
your instructions in more detail for me?

2) After entering the code, the form loads with the drop box automatically
opening. I'm looking to open the drop box by clicking on it, not just the
Arrow button attached to it.

3) I'm looking to inactivate (or gray out) the Price field when Place
Purchased = Gift. For some reason, the code doesn't create this behavior.

Any further information is appreciated... :)

Douglas J. Steele said:
1) Create a query that sorts the data in the order you want, and use the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place
Purchased, put code along the lines of Me!Price.Enabled =
(Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the
textbox.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Newsgroups said:
I have a simple Home Inventory database within Access 2000. I'm looking to
achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and
simultaneously, within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless I
click the Arrow button itself. Can I tell the drop menu to open when
clicked anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the
item as a gift, then obviously, there's nothing to populate the Price
field. Can I tell the Price field to "gray out" or "become inactive" when
the Place Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area,
rather than the text within the box?

5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a variety
of bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
For Question 3:

Use something along these lines in the AfterUpdate event of the combo
box.

If PlacePurchasedCombo = "Gift" then
me.Price.enabled = False
Else
me.Price.enabled = True
End If

Of course put the proper names for your objects in there.

Douglas,

Thank you for the prompt response! However, I still seem to be having some
problems.

1) Sort ascending by Category, then by Item Name. Would you please explain
your instructions in more detail for me?

2) After entering the code, the form loads with the drop box automatically
opening. I'm looking to open the drop box by clicking on it, not just the
Arrow button attached to it.

3) I'm looking to inactivate (or gray out) the Price field when Place
Purchased = Gift. For some reason, the code doesn't create this behavior.

Any further information is appreciated... :)

Douglas J. Steele said:
1) Create a query that sorts the data in the order you want, and use the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place
Purchased, put code along the lines of Me!Price.Enabled =
(Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the
textbox.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Newsgroups said:
I have a simple Home Inventory database within Access 2000. I'm looking to
achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and
simultaneously, within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless I
click the Arrow button itself. Can I tell the drop menu to open when
clicked anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the
item as a gift, then obviously, there's nothing to populate the Price
field. Can I tell the Price field to "gray out" or "become inactive" when
the Place Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area,
rather than the text within the box?

5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a variety
of bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
Microb0x,

Thanks for the assistance! Really appreciated.

The code works as expected. The "Price" field name changes to a gray over
white "emboss" effect as the field itself grays out. I was wondering, is
there any way to change the color indicating that inactive field?

microb0x said:
For Question 3:

Use something along these lines in the AfterUpdate event of the combo
box.

If PlacePurchasedCombo = "Gift" then
me.Price.enabled = False
Else
me.Price.enabled = True
End If

Of course put the proper names for your objects in there.

Douglas,

Thank you for the prompt response! However, I still seem to be having
some
problems.

1) Sort ascending by Category, then by Item Name. Would you please
explain
your instructions in more detail for me?

2) After entering the code, the form loads with the drop box
automatically
opening. I'm looking to open the drop box by clicking on it, not just the
Arrow button attached to it.

3) I'm looking to inactivate (or gray out) the Price field when Place
Purchased = Gift. For some reason, the code doesn't create this behavior.

Any further information is appreciated... :)

Douglas J. Steele said:
1) Create a query that sorts the data in the order you want, and use
the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines
of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of
the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place
Purchased, put code along the lines of Me!Price.Enabled =
(Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the
textbox.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I have a simple Home Inventory database within Access 2000. I'm looking
to
achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and
simultaneously, within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless
I
click the Arrow button itself. Can I tell the drop menu to open when
clicked anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the
item as a gift, then obviously, there's nothing to populate the Price
field. Can I tell the Price field to "gray out" or "become inactive"
when
the Place Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area,
rather than the text within the box?

5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a
variety
of bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
1) What specific problem are you having? Do you not know how to create a
query?

2) If that code fires when the form opens, odds are you put it in the form's
Open event or its GotFocus event. I said to put it in the combo box's
GotFocus event.

3) That code should disable the Price text box when Gift is put into the
PurchasePrice box and focus moves away from the PurchasePlace box (typo in
the original reply). If you want the Price to be disabled subsequent times,
you'll need to put the same code in the form's Current event.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Newsgroups said:
Douglas,

Thank you for the prompt response! However, I still seem to be having some
problems.

1) Sort ascending by Category, then by Item Name. Would you please explain
your instructions in more detail for me?

2) After entering the code, the form loads with the drop box automatically
opening. I'm looking to open the drop box by clicking on it, not just the
Arrow button attached to it.

3) I'm looking to inactivate (or gray out) the Price field when Place
Purchased = Gift. For some reason, the code doesn't create this behavior.

Any further information is appreciated... :)

Douglas J. Steele said:
1) Create a query that sorts the data in the order you want, and use the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place
Purchased, put code along the lines of Me!Price.Enabled =
(Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the
textbox.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Newsgroups said:
I have a simple Home Inventory database within Access 2000. I'm looking
to achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and
simultaneously, within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless I
click the Arrow button itself. Can I tell the drop menu to open when
clicked anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the
item as a gift, then obviously, there's nothing to populate the Price
field. Can I tell the Price field to "gray out" or "become inactive"
when the Place Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area,
rather than the text within the box?

5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a
variety of bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

You can't really hide the grey area,but then again, word, Excel etc all have
this area also....

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc). Also, using these options means you
do not have to bother setting up security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.
You can get this at:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
 
OOhhhhh! I also noticed that this AfterUpdate event behavior affects not
only the given record, but every record in the database. What I do to one
record will be the same for every one...

How do I fix that, may I ask?

microb0x said:
For Question 3:

Use something along these lines in the AfterUpdate event of the combo
box.

If PlacePurchasedCombo = "Gift" then
me.Price.enabled = False
Else
me.Price.enabled = True
End If

Of course put the proper names for your objects in there.

Douglas,

Thank you for the prompt response! However, I still seem to be having
some
problems.

1) Sort ascending by Category, then by Item Name. Would you please
explain
your instructions in more detail for me?

2) After entering the code, the form loads with the drop box
automatically
opening. I'm looking to open the drop box by clicking on it, not just the
Arrow button attached to it.

3) I'm looking to inactivate (or gray out) the Price field when Place
Purchased = Gift. For some reason, the code doesn't create this behavior.

Any further information is appreciated... :)

Douglas J. Steele said:
1) Create a query that sorts the data in the order you want, and use
the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines
of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of
the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place
Purchased, put code along the lines of Me!Price.Enabled =
(Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the
textbox.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I have a simple Home Inventory database within Access 2000. I'm looking
to
achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and
simultaneously, within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless
I
click the Arrow button itself. Can I tell the drop menu to open when
clicked anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the
item as a gift, then obviously, there's nothing to populate the Price
field. Can I tell the Price field to "gray out" or "become inactive"
when
the Place Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area,
rather than the text within the box?

5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a
variety
of bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
It's not that it is affecting additional records, the text box just
happens to still be disabled when you move to the next record(s)
because no event has occured that contains code to re-enable that text
box.

What you can do is put the same code in the Form_Current event of that
form:

If PlacePurchasedCombo = "Gift" then
me.Price.enabled = False
Else
me.Price.enabled = True
End If

This way when you move to a different record this same check is
performed and will setup your text box accordingly.

OOhhhhh! I also noticed that this AfterUpdate event behavior affects not
only the given record, but every record in the database. What I do to one
record will be the same for every one...

How do I fix that, may I ask?

microb0x said:
For Question 3:

Use something along these lines in the AfterUpdate event of the combo
box.

If PlacePurchasedCombo = "Gift" then
me.Price.enabled = False
Else
me.Price.enabled = True
End If

Of course put the proper names for your objects in there.

Douglas,

Thank you for the prompt response! However, I still seem to be having
some
problems.

1) Sort ascending by Category, then by Item Name. Would you please
explain
your instructions in more detail for me?

2) After entering the code, the form loads with the drop box
automatically
opening. I'm looking to open the drop box by clicking on it, not just the
Arrow button attached to it.

3) I'm looking to inactivate (or gray out) the Price field when Place
Purchased = Gift. For some reason, the code doesn't create this behavior.

Any further information is appreciated... :)

1) Create a query that sorts the data in the order you want, and use
the
query where you would otherwise have used the table.

2) In the combobox's GotFocus event, you can put code along the lines
of
Me!MyComboBox.Dropdown (replace "MyComboBox" with the actual name of
the
combobox)

3) In the AfterUpdate event of the textbox that's bound to Place
Purchased, put code along the lines of Me!Price.Enabled =
(Me!PurchasePrice <> "Gift")

4) Look at the Properties tab. See how wide the Header is, how wide the
textbox is, then do the arithmetic to set the Left property for the
textbox.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I have a simple Home Inventory database within Access 2000. I'm looking
to
achieve certain not-so-simple tasks.

First of all, I'll be referring to the following fields:
Category: Drop menu
Item Name: Text box
Place Purchased: Drop menu
Price: Text box (currency)

1) I would like the records in the Database to automatically sort by
Category (Computer hardware, Computer software, Misc), and
simultaneously, within those categories, by Item Name.

2) In form mode, when clicking on a drop menu, it doesn't open unless
I
click the Arrow button itself. Can I tell the drop menu to open when
clicked anywhere on it?

3) I also have a Place Purchased and a Price field. If I received the
item as a gift, then obviously, there's nothing to populate the Price
field. Can I tell the Price field to "gray out" or "become inactive"
when
the Place Purchased field contains [Gift]?

4) Dumb question: How do I center a text box within the Header area,
rather than the text within the box?

5) When loading a database, is there any way to omit displaying the
opening Access menu screen - and display just the form entry screen
itself - or must Access' menu stay open?

I have consulted Google tirelessly but achieved nothing through a
variety
of bizarre search phrases.

Any help is appreciated. Thanks!

- Disgruntled Access user
 
Back
Top