Opening a Record from a report

TonyHeslop

Board Regular
Joined
Jun 15, 2006
Messages
84
Hi Folks

What i have is a report which is filtered from a data table based on a persons login. The report shows individual records with a number of fields (as they do lol). I have a button at the end of each record for an action to be done. The action i want to be done is to have a form open up filtered to the record which the button was pressed for.

How do i do that? I can open up the form, that bit is easy, however, how do i make it so that the form is at the record that the user selects from the report?

Thanks
Tony
 
Hi all

Thats great thanks, I discovered what i had done wrong when i made my first continuous form, i dropped all the fields in, but it was that tall that it didnt look like teh form was scrolling, just jumping through records as a normal form would. I re-arranged my fields and shrunk my form and hey presto its how i want it :)

Thank you all very much for your assistance :)

Tony
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi Folks

I have half got this working correctly but i am still having some slight issues with it.

I get all my records to show one after another now, I have added an appeal button to this which when i click is supposed to make certain controls visble and also enable some controls which i have set to enabled = no in the form properties in design mode.

I used the following code to turn on the controls and supposedly enable the fields i want to.
Code:
Me.Reason_For_Appeal.Visible = True
Me.Label66.Visible = True
Me.optCompass.Visible = True
Me.optNBA.Visible = True
Me.optBoth.Visible = True
Me.lblCompass.Visible = True
Me.lblNBA.Visible = True
Me.lblBoth.Visible = True
Me.optCompass = True
Me.cmdSubmitAppeal.Visible = True
Me.cmdCancelAppeal.Visible = True

Me.Reason_For_Appeal.Enabled = True

However i am not able to type in the field even though I dont have the field locked in the form design.

Any ideas?

Cheers
Tony
 
Upvote 0
Tony

Do you have a button for each record on the continuous form that when clicked opens a single view form with all the fields for the record you clicked the button for?
 
Upvote 0
Hi Norie

I dont, i think that would be a very good way to do what i am wanting to do though. How do i open a new form using the current record as the source record for the form?

Cheers
Tony
 
Upvote 0
Tony

Very easily - if the forms have a common field, eg ID , which is unique for each record.

Assuming you've created the forms with a field like that :


Add a button in the detail section of the continuous form so it appears for each record .

Access should then fire up a wizard so you can tell it what the button does.

On the first step choose Form Operations.

Then chose to open another form.

Choose the single view form to open.

Choose to open to a specific record.

Can't remember exactly what comes next but you should get to choose which field to link the forms by.

For that choose the ID field.

Probably easiest to just follow the on screen instructions. :)
 
Upvote 0
Hi Norie

Thats great, thanks for the advice, i will give that a whirl a bit later when i get free time to work on it and report back if successful etc :)

Thanks
Tony
 
Upvote 0
Tony

Good luck, especially with trying to understand my ramblings.

I've actually just found out how to post images here, so I could post some screenshots if it helps.

PS It would give me some practice with that sort of ting too.
 
Upvote 0
Hi Norie

I havent managed to get the free time yet to look at it, so if you could post some screen shots (to give you practise, yeah thats the reason ;) ) Then that would be great ;)

Cheers
Tony
 
Upvote 0
Hi Norie

Just to let you know, i have already completed this and got it working almost how i want it, i have linked the two forms perfectly etc. What i would like to do now is only allow the fail to be appealed as long as a certain field on the record is blank. So, how do i check the specific field on the record that the button to appeal is pressed on?

Example, say the field i wish to check is "Appealed Already?". As long as that value was blank, i would like them to be able to submit an appeal, otherwise i would put a message box up stating its already been appealed and not able to be appealed again.

I know if i was doing this on a single form i would just use
Code:
If isnull(me.AlreadyAppealed) then
open appeal form
else: msgbox("Sorry this fail has already been appealed")
endif

However, will that work on a continuous form?

Thanks
Tony
 
Upvote 0
Tony

How exactly have you got the first part working?

ie opening the 2nd form from the continuous form?

When you look at the properties of the button what does is say on the Event tab for On Click?

Does it look like this?

EventTab.jpg
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,707
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top