Form update not showing (1 Viewer)

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Hi - I have a data entry form, consisting of a form/subform. I use a front end menu form to select doing the data entry, by clicking a button. I updated the subform so that upon opening the form, the cursor appears in the first field in the subform, and then the user tabs through the fields to input data. When I run the form by clicking on the main form name in the side menu, it comes up, showing the cursor in the appropriate field. But, when I select the form through the front end menu, the form appears, but the default cursor does not show up on the form.
 

NickHa

CITP
Local time
Today, 07:44
Joined
Jan 29, 2012
Messages
203
How do you get the cursor to the first subform field? I assume it's in VBA; if that's the case, from what event(s) is the positioning code called?
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Thanks for replying. When the form/subform is first opened (Sub Form_Load), I do a SetFocus on that field.
 

NickHa

CITP
Local time
Today, 07:44
Joined
Jan 29, 2012
Messages
203
Perhaps the form is already loaded, so you don't get the load event triggering? How about putting the SetFocus in the subform's Current event? Depends on how the user interaction works.
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
I just tried using Sub Form_Current instead of Sub_Form Load in the subform code, but that isn't setting the cursor.
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Actually, after entering the form from the menu form, the tab function doesn't work in the main form. When I used it, it was moving down the left column of database objects. I would have to actually click in the main form to start data entry.
 

NickHa

CITP
Local time
Today, 07:44
Joined
Jan 29, 2012
Messages
203
You'll need to give more information to get any further suggestions. How about posting your code and provide more details about the form and subform and how they are used?
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Hi - Here's the db. Again, if you open the frmMeters form, the tab shows up on the date field, the first field in the subform. Running this through the frmMenuSwitchboard (the first button) - no tab. Thanks.

View attachment EptTracker.zip
 

NickHa

CITP
Local time
Today, 07:44
Joined
Jan 29, 2012
Messages
203
I can't open your DB - are you using Access 2010? If you can save in in Access 2007 format, I can have a look.

I tried both DBs in the zip file - each come up with unrecognized format in my Access 2007.
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
I am not able to save the database in any other format but 2010.
 

NickHa

CITP
Local time
Today, 07:44
Joined
Jan 29, 2012
Messages
203
Really?:confused: In Access 2007, I have the ability to save to earlier versons - I'd be surprised if that option had been removed.

Anyway, if you can't do it, I shall have to crank up my laptop (which takes an age) and see if I can review your DB on it.

Alternatively, some other kind person may take pity on us and do the necessary.:)
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Thank You very much for you help. I will keep going through the db and maybe something will jump out at me.
 

NickHa

CITP
Local time
Today, 07:44
Joined
Jan 29, 2012
Messages
203
I managed to get my laptop to work, so I have now got your DB open.
There isn't a form named frmMeters, nor one named frmMenuSwitchboard?
The two forms present are 'Meter Counts' and 'MeterCounts'. Opening these from the sidebar both have the focus on the first field, as would be expected.
Neither form has a subform and there's no code contaiBning a SetFocus statement.
Please clarify?
 

Heatshiver

Registered User.
Local time
Today, 13:44
Joined
Dec 23, 2011
Messages
263
Not sure if this helps, but why not set the tab order so that the field you want is always first instead of using SetFocus?
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Hi, thanks for replying. I did set the tab order so that the field to have the cursor be at is first. From the switchboard, I can bring up the data entry form but I have to click in the form, then I can enter my data. When I go into the form from the switchboard, the default tab is not displayed. If I don't use the switchboard and just click on the main form name in the objects panel on the left, it comes up and the default cursor position is there in the first field. It has to be something with the switchboard that I left out, but I just don't see it yet.
 

Heatshiver

Registered User.
Local time
Today, 13:44
Joined
Dec 23, 2011
Messages
263
I did a bit of testing and it has to do with your switchboard form.

I first tried a couple of different ways I could think of using SetFocus without succeeding.
I then tried changing a few properties, again no help.
I even tried deleting the macro and using simple VBA so I could use Me.Visible to see if this would help. Again, no change.

However, when I created a simple test form with one button meant to only open frmMachines, it did so and the cursor was blinking.

Not sure what's going on, but something about that form is messing up the blinking cursor.

It doesn't seem like it was a complicated switchboard form. You may want to create another one and test it to see if it fixes it. Things like this have happened to me and sometimes this works.

I also tried a Compact and Repair, but that didn't do anything either.
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
From the switchboard I have to run the data entry, a chart, and a report with meter totals by machine. There is no problem running the chart and the report. Since the data entry is a form/subform setup, and needing a cursor default on the subform, this setup needs some extra code for that button in order to connect. I'll just keep working with it. Thanks for the help.
 

Heatshiver

Registered User.
Local time
Today, 13:44
Joined
Dec 23, 2011
Messages
263
Alright, decided I could get this and I have your solution:

Go into your macro and move CloseWindow above OpenForm.

Not sure why this works, but it does. It also works if done this way in VBA. Be wary though, this can cause trouble if you have other pertinent commands that need time to be executed before the form is closed. I ran into this problem when using VBA.
 

Uni03

Registered User.
Local time
Today, 02:44
Joined
Jul 20, 2011
Messages
51
Yes-that did it. Thank you very much for your help.
 

Users who are viewing this thread

Top Bottom