Bound Sub form Not loading when linked to MySQL Db (1 Viewer)

kobiashi

Registered User.
Local time
Today, 08:37
Joined
May 11, 2018
Messages
258
hi all

i have recently migrated my BE Db to a MySQL server, for the most part its stabel a few loading issues which i have resolved, however i seem to have come across a problem i cannot see a resolution to

i have a form called FrmManHoursAdd

in this form i have a subform called SubFrmManHoursAdd

these are linked with a master and child field, when i use the FE with a BE Db on my laptop it works no problems, but when im linked to the MySQL server, the Sub Form does not load.


when i go from form veiw to design view and back to form view, the sub form loads, with all entries, so it is working to some extent.

i have tried on the main form
Code:
_OnCurrent Me.SubFrmManHoursAdd.Form.requery
but it did nothing.

any help would be very appreciated
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:37
Joined
Feb 19, 2002
Messages
42,981
If there are two different BE databases, perhaps one of them does not have a PK defined for the table the subform is bound to.
 

kobiashi

Registered User.
Local time
Today, 08:37
Joined
May 11, 2018
Messages
258
If there are two different BE databases, perhaps one of them does not have a PK defined for the table the subform is bound to.
hi thanks for the reply, ive checked the primary key in the MySQL database, its present set correctly, the relationships are set up aswell
 

Isaac

Lifelong Learner
Local time
Today, 01:37
Joined
Mar 14, 2017
Messages
8,738
I don't know MySQL, per se, but if it is like SQL Server, then: There is a moment in time while you are doing the actual 'linking' of the table, that you have to tell Access which column is the primary key. If you fail to do that, the linked table might become non-updateable in Access. Until you delete the link, re-link it, and be sure to answer that prompt. Double check that?

Do you have any code in the subform's Load or Open events?
 

bastanu

AWF VIP
Local time
Today, 01:37
Joined
Apr 13, 2010
Messages
1,401
Is the subform's record source the entire table or a query that needs other parameters? Try to reset the subform's recordsource instead of .Requery.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:37
Joined
May 7, 2009
Messages
19,169
check if there is Master/Child Link fields set on the subform.
 

kobiashi

Registered User.
Local time
Today, 08:37
Joined
May 11, 2018
Messages
258
I don't know MySQL, per se, but if it is like SQL Server, then: There is a moment in time while you are doing the actual 'linking' of the table, that you have to tell Access which column is the primary key. If you fail to do that, the linked table might become non-updateable in Access. Until you delete the link, re-link it, and be sure to answer that prompt. Double check that?

Do you have any code in the subform's Load or Open events?
thanks for the reply, ica nsee the PK in the linked tables, ive checked all of them
 

kobiashi

Registered User.
Local time
Today, 08:37
Joined
May 11, 2018
Messages
258
Is the subform's record source the entire table or a query that needs other parameters? Try to reset the subform's recordsource instead of .Requery.
thanks for your reply, the query doesnt take any data from anyother table.

ive tried to find a solution to reseting the query, but to no success, if you have any suggestions i be very greatful in hearing them
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:37
Joined
May 7, 2009
Messages
19,169
what is the master/child field links? are they Related?
 

Users who are viewing this thread

Top Bottom