Requery (1 Viewer)

Micron

AWF VIP
Local time
Today, 16:57
Joined
Oct 20, 2018
Messages
3,478
Looks like everyone's given up, I'll keep at it and figure out some way of doing it.
Are you kidding??
OK, Ciao.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:57
Joined
Oct 29, 2018
Messages
21,473
Righteoo.. sorry. Will get a mockup done and do just that, thanks

And just so you know, I haven’t given up either, but it’s time for bed over here. So, I’ll see you in the morning, if no one else has figured it out by then. Good night.
 

kirkm

Registered User.
Local time
Tomorrow, 08:57
Joined
Oct 30, 2008
Messages
1,257
Took me a while to make the mock up work. Hopefully it'll show you the problem. Thanks
 

Attachments

  • Database6.mdb
    268 KB · Views: 32

AccessBlaster

Registered User.
Local time
Today, 13:57
Joined
May 22, 2010
Messages
5,951
Its odd that you chose to use a subform control where none was needed. Usually a subform is for detail or child records.
 

kirkm

Registered User.
Local time
Tomorrow, 08:57
Joined
Oct 30, 2008
Messages
1,257
I didn't know if it was a subform or not. Its odd too that it didn't use the font specified in the controls. Or did it for you? Should be Ms Sans Serif.
 

isladogs

MVP / VIP
Local time
Today, 21:57
Joined
Jan 14, 2017
Messages
18,219
Your main form is called FormRun and the subform control is also called FormRun. Change it to anything other than the main form name as using that will confuse Access … as well as yourself :rolleyes:

If you like it can be the same name as the subform itself which is FormRunSub in which case you can use Me.FormRunSub.Form.Requery on the main form button

BTW you could have just used Me.Requery on the button and it should requery the subform as well
 

kirkm

Registered User.
Local time
Tomorrow, 08:57
Joined
Oct 30, 2008
Messages
1,257
I'd dragged FormRunSub onto FormRun without realisjng it would change it's name. It couldn't find the name anywhere in Properties. StillI can't get Me.Requery to work and Me.FormRunSub.Form.Requery brings up an error.
Is the "subform control" the Form I dragged in?

If a Date is added to the ThisDate Column, requery should re-order the whole thing by ThisDate? I found a r-click and "Sort Oldest To Newest" does wjhat's required but I still hope to find why the button doesn't work.
 

isladogs

MVP / VIP
Local time
Today, 21:57
Joined
Jan 14, 2017
Messages
18,219
I've modified this slightly just to check what you were saying.
Subform control now called FormRunSub. I clicked on the outside edge then renamed it in the property sheet.

Command button requery definitely works.
I've reordered the dates to sort newest to oldest just so I could see the requery more clearly.

Hope that helps
 

Attachments

  • Database6_1.zip
    42.1 KB · Views: 31

theDBguy

I’m here to help
Staff member
Local time
Today, 13:57
Joined
Oct 29, 2018
Messages
21,473
Took me a while to make the mock up work. Hopefully it'll show you the problem. Thanks
Good morning, kirkm. Looks like Colin picked it up while I was sleeping. Please let us know if this took care of it for you. Cheers!
 

kirkm

Registered User.
Local time
Tomorrow, 08:57
Joined
Oct 30, 2008
Messages
1,257
Hi DbGuy & Colin, yes it is working just fine. Blimey... I spent all day on this yesterday. I did not see the Property Sheet ever show selection type 'SubForm/SubReport' before, so never seen a name. It's there now. Clicking on the square where the rulers meet sometimes brings it up, but sometimes there's a black square and the Property Sheet changes to show "Form". That's where I spent hours looking there for a Name of some kind (to find what I was looking at). There's some trick to where/what you click for each, it certainly doesn't toggle in a logical way and the response from a second click varys at times.
The "Me.FormSubMain.Form.Requery" was exactly what majP said to do in Msg #2.
Colin, how did you change "FormRun" to "FormSubRun" in that control? It won't let me edit it and "FormSubRun" isn't an option in the dropdown list.
Is there a reason why it would take on that name, instead of its own one?

DBGuy, I'll go back to that other thread about fonts, but this is what I was talking about. Do you see the MS Sans Serif font in design view? Why doesn't it use this font in Form View? For a brief moment I thought the newly found Property sheet would be the answer and have a font option, but no...

Anyway, thank you all very much and I'm sorry it took so long to kind of get a solution. Now I can do some work with it at last :) (If I can delete my Form and Import Colins).
 

isladogs

MVP / VIP
Local time
Today, 21:57
Joined
Jan 14, 2017
Messages
18,219
The control name is actually FormRunSub...same as the form.
I renamed it in the main form property sheet As it is a control of the main form.

The only way it could have been named FormRun is if you did it yourself.
Otherwise it would have kept the subform name or possibly something like Child1.
 

kirkm

Registered User.
Local time
Tomorrow, 08:57
Joined
Oct 30, 2008
Messages
1,257
Many thanks Colin. All sorted and the requery button is working.
You don't know whereabouts to set the name of the font that will be used by the subform?
 

isladogs

MVP / VIP
Local time
Today, 21:57
Joined
Jan 14, 2017
Messages
18,219
Go to Design view (or Layout View)
Select a control or better still select them all using the mouse.
You can then change the font name, size etc from any of the following:
- Home tab or Format tab on the ribbon
- Format tab on the controls' property sheet
 

kirkm

Registered User.
Local time
Tomorrow, 08:57
Joined
Oct 30, 2008
Messages
1,257
I have done both and although the controls show the right font (in design mode) when in Form view they're different. Its a change there I've been unable to figure out.
 

isladogs

MVP / VIP
Local time
Today, 21:57
Joined
Jan 14, 2017
Messages
18,219
Your database is an MDB file so options are more limited
If you change it to ACCDB, the ribbon settings for text formatting will be enabled in Datasheet view so you can change it to what you want.
If you are using A2010 or later you can also use Themes as I described in a link provided earlier in this thread
 
Last edited:

Users who are viewing this thread

Top Bottom