Beyond the drag-and-drop in Microsoft Access

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Juice13610

Thread Starter
Joined
Oct 26, 2004
Messages
69
I have a few problems with an Access DB I created. I am pretty much a newbie at it, and an intern actually showed me how easy it is to use. I just have a couple of seemingly simple things that would be nice if they worked.

1. When typing in the "PO" field (it's the number assigned to the purchase requisition), I would like to be able to use it as a search field...so if I type "199039" in to the field and press enter, the contents of that record would show up. Instead here's what it does; Let's say I'm filling out the contents for PO #199000. I fill out all of the comment boxes and everything for 199000. Now, I go up to the PO field, type in 199039. Rather than opening that record, now it saves all of this information in po 199039. So anything previously entered for this record is now gone! I have a search button which has been working fine, but typing in a number in the PO field would be beautiful!

2. It is very simple to the point of being dumb....I'm not going to win any awards for this database, it's pretty crumby (wow, now I'm beating myself up :eek: )...If we order a laptop, memory, and a laptop bag, you check the appropriate checkboxes; the one next to "Laptop?" the one next to "Memory?" and the one next to "Laptop bag?" The problem is, I couldn't figure out a QTY scroll-box (where you can click UP to increase the QTY, down to decrease) so it is just a text box. Is there some way to make the QTY box automatically change to "1" when the box is checked?
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Juice, when simply searching for a Record you should never use a text Field where you have to type in a number, because people make typing errors.
It also sounds as if your PO field is "bound" to the table, i.e. it has a "Control Source", whereas Special search fields should be "Unbound"
To find a Record on your Form use a Combo Box, but when you create it select the "Find a record matching the Combo selection", this will allow you to type in the Number and the List in the Combo will "jump" to the real PO numbers as you type in and then you can select one from the list.
Your second question is not so Dumb, it is simple to achieve but involves some VBA code, the code checks what state the Check Box is in, i.e. Ticked or Unticked, if it is ticked it sets the value of the qty field to 1 or if not Ticked sets it to 0.
Would you like to try and add the VBA code yourself?

I mentioned "Special Unbound Search Fields" , these can be used to enter data where you do a "like" search to find one or more records with something in common,
This kind of search would be used to find all of the Records with a Name like "jones" or all Addresses with a City called London etc.
 

Juice13610

Thread Starter
Joined
Oct 26, 2004
Messages
69
Hey, thanks for the response! You helped a lot by pointing out the usefulness of a combo box.

Now my only question is this; when I type in a NEW po #, it is pulling up a record with the fields already populated, making it seem that a made up PO is an actual PO. It is not keeping the information up of the last valid PO I had pulled up, it is actually blanking the fields and re-populating. Do you know how to make the default field = nothing?
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Are you using the Combo to enter Data, it should only be used for searching.
 

Juice13610

Thread Starter
Joined
Oct 26, 2004
Messages
69
Right, in the combo box I am using to search, I am typing in a PO # that does not exist. So I woudl like it to return an error or something. Instead it pulls up a random PO that does actually exist.
 

Juice13610

Thread Starter
Joined
Oct 26, 2004
Messages
69
Got it. Thanks again. I hope I'm not overly annoying, just annoying enough that you'll continue helping me. ;)
 
Joined
Oct 2, 2008
Messages
132
Only new to the forum but have been watching for awhile. Just thought I would offer a thought.

Wouldn't it be better to use Dlookup in the Afterupdate of the PO field..? Then in the VBA code if the Dlookup finds a PO on file that is the same as the one that is being entered, a error message could be displayed.
I would think that looking at a combo box full of already entered PO numbers would be time consuming..
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top