Your video is the first that, I really seen that shows the potential of QR codes being generated in access. A big thanks!!!! Is the a way to save QR image as the name of the text box data?
Hi change this line - savePath = Application.CurrentProject.Path & "\qr_code.bmp" to savePath = Application.CurrentProject.Path & "\" & qrData & ".bmp"
Hi, this error appears, how can I resolve it? Thank you, "Compilation error: Invalid topic number or property"ssignment" alla riga : result = URLDownloadToFile(0, apiUrl, savePath, 0, 0), si evidenzia : "URLDownloadToFile(0, apiUrl, savePath, 0, 0)"
Try Changing the declaration at the top to : Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#If VBA7 Then Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As LongPtr, ByVal lpfnCB As LongPtr) As Long #Else Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long #End If Private Sub btnGenerateQR_Click() ' Declare variables Dim apiUrl As String Dim qrData As String Dim savePath As String Dim result As Long ' Get QR data from textbox qrData = Me.txtqrdata.Value ' Construct API URL apiUrl = "api.qrserver.com/v1/create-qr-code/?data=" & qrData & "&size=200x200" ' Specify save path for BMP file in the same directory as the Access database savePath = Application.CurrentProject.Path & "\qr_code.bmp" ' Download QR code image as BMP file #If VBA7 Then result = URLDownloadToFile(0, apiUrl, savePath, 0, 0) #Else result = URLDownloadToFile(0, apiUrl, savePath, 0&, 0&) #End If ' Check if download was successful If result = 0 Then ' Display the downloaded image in the image control Me.imgQRCode.Picture = savePath Else MsgBox "Failed to download QR code image.", vbExclamation End If End Sub
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As LongLong, ByVal lpfnCB As LongPtr) As LongPtr
Try Changing the declaration at the top to : Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#If VBA7 Then Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As LongPtr, ByVal lpfnCB As LongPtr) As Long #Else Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long #End If Private Sub btnGenerateQR_Click() ' Declare variables Dim apiUrl As String Dim qrData As String Dim savePath As String Dim result As Long ' Get QR data from textbox qrData = Me.txtqrdata.Value ' Construct API URL apiUrl = "api.qrserver.com/v1/create-qr-code/?data=" & qrData & "&size=200x200" ' Specify save path for BMP file in the same directory as the Access database savePath = Application.CurrentProject.Path & "\qr_code.bmp" ' Download QR code image as BMP file #If VBA7 Then result = URLDownloadToFile(0, apiUrl, savePath, 0, 0) #Else result = URLDownloadToFile(0, apiUrl, savePath, 0&, 0&) #End If ' Check if download was successful If result = 0 Then ' Display the downloaded image in the image control Me.imgQRCode.Picture = savePath Else MsgBox "Failed to download QR code image.", vbExclamation End If End Sub
Mine is getting hung up on "Me.imgQRCode.Picture=savepath". How do I correct this? I have named the image box imgQRcode. Thus, I'm not sure if its not the save path
SEI UN GRANDE, lo sarai ancora di più , il tempo di provarlo. :-)
Thats Incredible!!! Congrats for your work for us!
Many many thanks for this great effert!!!
Thanks bro, it's work great!!!
Excel work. Thanks so much.
thanks, really good job
Hello. It works in ms access. 👍
Your video is the first that, I really seen that shows the potential of QR codes being generated in access. A big thanks!!!! Is the a way to save QR image as the name of the text box data?
Hi
change this line - savePath = Application.CurrentProject.Path & "\qr_code.bmp"
to savePath = Application.CurrentProject.Path & "\" & qrData & ".bmp"
amazing it works thank you again
ازاي ممكن اظهر ال QR في التقرير
You are great thank you very much
I will try it
Einwandfreie Funktion. Kann ich nur empfehlen
Words do not appear in the QR if the language is Arabic
Hi, this error appears, how can I resolve it? Thank you, "Compilation error: Invalid topic number or property"ssignment" alla riga : result = URLDownloadToFile(0, apiUrl, savePath, 0, 0), si evidenzia : "URLDownloadToFile(0, apiUrl, savePath, 0, 0)"
Very Nice... thanks a Lot!! it was used in my Project successfully... will it work permanently or like trail? bze it is depending on other website..
very good
Thanks
Thank you.
good
Excellent!
Sorry i cannot use the general code on ms acces 64 byte, can you support
Best🎉
how can the QR be shown in the report
Dear Brother.
I need QR code for E-Invoicing in Saudi Arabia using ACCESS
Can you explain your requirement little bit further ?
Include multiple fields and then retrieve them in another table
Any suggestions for MS Access 64 Bit
Try Changing the declaration at the top to :
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#If VBA7 Then
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As LongPtr, ByVal lpfnCB As LongPtr) As Long
#Else
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#End If
Private Sub btnGenerateQR_Click()
' Declare variables
Dim apiUrl As String
Dim qrData As String
Dim savePath As String
Dim result As Long
' Get QR data from textbox
qrData = Me.txtqrdata.Value
' Construct API URL
apiUrl = "api.qrserver.com/v1/create-qr-code/?data=" & qrData & "&size=200x200"
' Specify save path for BMP file in the same directory as the Access database
savePath = Application.CurrentProject.Path & "\qr_code.bmp"
' Download QR code image as BMP file
#If VBA7 Then
result = URLDownloadToFile(0, apiUrl, savePath, 0, 0)
#Else
result = URLDownloadToFile(0, apiUrl, savePath, 0&, 0&)
#End If
' Check if download was successful
If result = 0 Then
' Display the downloaded image in the image control
Me.imgQRCode.Picture = savePath
Else
MsgBox "Failed to download QR code image.", vbExclamation
End If
End Sub
it doesnt work for russian language, why?
for ms acess 64bit failed
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As LongLong, ByVal lpfnCB As LongPtr) As LongPtr
Try Changing the declaration at the top to :
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#If VBA7 Then
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As LongPtr, ByVal lpfnCB As LongPtr) As Long
#Else
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
(ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
#End If
Private Sub btnGenerateQR_Click()
' Declare variables
Dim apiUrl As String
Dim qrData As String
Dim savePath As String
Dim result As Long
' Get QR data from textbox
qrData = Me.txtqrdata.Value
' Construct API URL
apiUrl = "api.qrserver.com/v1/create-qr-code/?data=" & qrData & "&size=200x200"
' Specify save path for BMP file in the same directory as the Access database
savePath = Application.CurrentProject.Path & "\qr_code.bmp"
' Download QR code image as BMP file
#If VBA7 Then
result = URLDownloadToFile(0, apiUrl, savePath, 0, 0)
#Else
result = URLDownloadToFile(0, apiUrl, savePath, 0&, 0&)
#End If
' Check if download was successful
If result = 0 Then
' Display the downloaded image in the image control
Me.imgQRCode.Picture = savePath
Else
MsgBox "Failed to download QR code image.", vbExclamation
End If
End Sub
not working
Mine is getting hung up on "Me.imgQRCode.Picture=savepath". How do I correct this? I have named the image box imgQRcode. Thus, I'm not sure if its not the save path
Hi, any update on this? im also getting this error also. thanks