Assigning buttons to same table/but different fields. (1 Viewer)

Czeszyn

Registered User.
Local time
Today, 11:54
Joined
Oct 14, 2014
Messages
128
Okay, I have a hard one here.
I had created a table that list plastic type scrap, that gives a description and photo. I created a form that allows a user to enter this information if there are more to be added.

Now here comes the hard part. In another form, I record scrap numbers. I wanted to create buttons for each scrap name, so the person can look at what is consider scrap. I know how to do buttons, that is not the problem.

What I want to be able to do is for example:
If I press button that says Short Shots, I would like it to go right to the table where that information is at, in this case in my Table it is Field 9. I do not want to just press the button, and it goes to the table, I would like it to go right to the spot in the table. Is this possible?

Thanks again for the help.
 

plog

Banishment Pending
Local time
Today, 13:54
Joined
May 11, 2011
Messages
11,669
Tables don't have functionality, its best to think of them as just a huge space on a disk drive where you throw data. Forms and reports on the otherhand, can do some neat tricks...but...

You have to have your tables set up correctly to achieve those tricks. I think you have bigger issues than what you are trying to accomplish--you need to normalize your data. You shouldn't store values in table or field names. So if 'Short Shots' is a type of scrap, then it should not be the name of a field. Instead, you should have a field called 'ScrapType' and one of the values in it should be 'Short Shots'.

If you did it that way, you could easily run a report on just the Short Shots and show the relevant data to the end user. You need to first get your data correct before you move on to reports or data entry.
 

Czeszyn

Registered User.
Local time
Today, 11:54
Joined
Oct 14, 2014
Messages
128
HI Plog

I actually do have it set up that way in my table. My table fields are as follows:
ScrapDefect
ScrapCauses
ScrapRemidies
Photo

Tony
 

Czeszyn

Registered User.
Local time
Today, 11:54
Joined
Oct 14, 2014
Messages
128
Hi Plog,

I not trying to create a report, I just want it so that a person could hit a button, and it would go to the scrap table and go right to the right scrap.

Tony
 

plog

Banishment Pending
Local time
Today, 13:54
Joined
May 11, 2011
Messages
11,669
Again, you can't jump to specific columns in a table. You can jump to a specific row. I'm confused where this data is. Your initial post said you wanted to jump to Field 9 in your table, then your prior post says you have only 4 fields.

Which is it? Can you demonstrate with data what your table looks like and highlight where you want to jump to?
 

Czeszyn

Registered User.
Local time
Today, 11:54
Joined
Oct 14, 2014
Messages
128
My table fields (columns) are as follows:
ScrapDefect
ScrapCauses
ScrapRemidies
Photos

So what i am asking is that in a different form, where I have the names of each scrap. I want to be able to press the button of that scrap name, so that it would go to my other form and bring up just that scrap and its info. If I just create a button, it goes to the scrap form, but it starts at the top, and i have to scroll down to the one i want. I do not want to do that. I am looking for where I can go right to that scrap name.
 

plog

Banishment Pending
Local time
Today, 13:54
Joined
May 11, 2011
Messages
11,669
I want to be able to press the button of that scrap name, so that it would go to my other form and bring up just that scrap and its info.

You really need to be precise in the terms you use. Initially you wanted to open a table, now you have siad it is a form. Those are distinct object types in Access.

The code behind your button should run a DoCmd.OpenForm (https://msdn.microsoft.com/en-us/library/office/ff820845.aspx)to open your form. One of the things you can pass in that method is a filter. So, you can open the form and show just records who have a particular value for a particular field.

Yours will look something like this:

DoCmd.OpenForm "YourFormNameHere", , ,"[YourFieldNameHere] = 'FieldValueHere'"
 

Users who are viewing this thread

Top Bottom