473,461 Members | 1,514 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Displaying Records on a MS Access 2000 form (frontend) using MySQL (backend)

Hi all,

I am having difficulty displaying records on a frontend MS Access 2000 form using a MySQL backend. The following code works well with the Jet database engine but doesn't work properly using the MySQL backend database. All records are displayed on the form using the Jet, but only one record appears using MySQL. Perhaps it just needs some tweaking to work with MySQL. Any advice would be great. Thanks

Function HelpDesc(HelpFrm As Integer)
i = 0
j = 0
StrHelp = "Help not found"
strHelpSection = "Help not found"
strAccessSQL = "SELECT * from tbl_ADMIN_FormHelp Where (CtlFlag = Yes) and ID = " & HelpFrm
GetCurrentDatabase
Set rsAccessControl = db.OpenRecordset(strAccessSQL)
If rsAccessControl.RecordCount = 1 Then
strSQLUpdate = rsAccessControl("ID")
strHelpSection = "Waiting................"
strHelpSection = "Section Name : " & rsAccessControl.Fields("CtlCaption") & vbCrLf & vbCrLf
StrHelp = vbCrLf
StrHelp = StrHelp & Trim(rsAccessControl.Fields("CtlDesc")) & vbCrLf
StrHelp = StrHelp & Trim(rsAccessControl.Fields("CltBusinessRule")) & vbCrLf
strAccessSQL = "Select * from qry_ControlTab where tbl_admin_FormHelp.id = " & HelpFrm & " or tbl_admin_FormHelp.Ctltype = " & HelpFrm
GetCurrentDatabase
Set rsAccessControl = db.OpenRecordset(strAccessSQL)
i = 0
For j = 0 To rsAccessControl.RecordCount - 1
strSelected = rsAccessControl.Fields("tbl_Admin_ControlHelp.CtlT ype").Value

If IsNull(rsAccessControl.Fields("CtlDesc")) = False Or IsNull(rsAccessControl.Fields("CltBusinessRule")) = False Then
i = i + 1
If strSelected = "104" Then
'StrHelp = StrHelp & vbCrLf & i & ". Button Name : " & rsAccessControl.Fields("CtlCaption") & " " & vbCrLf
StrHelp = StrHelp & vbCrLf & i & " . " & rsAccessControl.Fields("CtlCaption") & " : " & vbCrLf
Else
'StrHelp = StrHelp & i & ". Label Name : " & rsAccessControl.Fields("CtlCaption") & " " & vbCrLf
StrHelp = StrHelp & i & " . " & rsAccessControl.Fields("CtlCaption") & " : " & vbCrLf
End If
If IsNull(rsAccessControl.Fields("CtlDesc")) = False Then
StrHelp = StrHelp & " " & rsAccessControl.Fields("CtlDesc") & vbCrLf
Else
StrHelp = StrHelp & vbCrLf
End If
If IsNull(rsAccessControl.Fields("CltBusinessRule")) = False Then
StrHelp = StrHelp & " " & rsAccessControl.Fields("CltBusinessRule") & vbCrLf & vbCrLf
Else
StrHelp = StrHelp & vbCrLf
End If
End If


rsAccessControl.MoveNext
Next
rsAccessControl.Close
DoCmd.OpenForm "frm_Gen_sfrm_Help", acNormal, , , acFormReadOnly, acDialog
Else
DoCmd.OpenForm "frm_Gen_sfrm_Help", acNormal, , , acFormReadOnly, acDialog
End If

End Function
Nov 20 '07 #1
0 920

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jason Gyetko | last post by:
I have a software application with an Access front end and an Access backend to house the data. Recently I converted the backend to MySQL. The Access frontend works fine connecting to the MySQL...
28
by: Lee Rouse | last post by:
Hello all, This is going to be a rather lengthy "question". I have an Access 2k database, separated front end/back end. Front end copies are on about 30 workstations and used frequently during...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
5
by: Bob Dydd | last post by:
Hi Everybody I have an Access 2000 MDB with the Usual FrontEnd/BackEnd Arrangement. The program depends on being able link to "Inbox" in Ms Outlook 2000. This is easy enough to do from the...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
6
by: gerbski | last post by:
Hi all, I am relatively new to ADO, but up to now I got things working the way I wanted. But now I've run into somethng really annoying. I am working in MS Access. I am using an Access...
4
by: ThePhenix | last post by:
Hi everybody, I have recently been doing a conversion for my boss for a access 2000 database (both front and backend) to a MSSQL backend. I finished the conversion today (as quite a lot of the...
0
by: John Kirkpatrick | last post by:
Hi all, I am having difficulty displaying records on a frontend MS Access 2000 form using a MySQL backend. The following code works well with the Jet database engine but doesn't work properly...
2
by: Steve | last post by:
I have zero experience with ODBC. If I have an Access frontend connected to a SQL Database using ODBC, are the tables connected like a frontend/backend Access database where the the tables you see...
3
by: minimalPixel | last post by:
Hi All, Sorry for the noob question, but hopefully this is an easy one. I'm not exactly sure if this is a php or a mysql question, but I'm working with a component in Joomla's backend that...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.