Quantcast
Channel: Access for Developers forum
Viewing all 14673 articles
Browse latest View live

arabic language pac


another user edited this record - message

$
0
0

2013.accdb:  We have a form that is already so busy, unfortunately…. that to add an additional a long text field big enough to read and work in easily really is problematic in terms of the already crowded screen experience - and we would like to avoid moving to a tab control.... 

As the field is only occasionally in play - the idea of a small button that opens a pop up form containing just the new field is a welcomed approach.  However this is triggering the message upon return into fields of the main form:

The data has been changed. Another user edited this record and
saved the changes before you attempted to save your changes.
Re-edit the record

The message is very understandable to me, and I can explain to users why it occurs - but I would like to eliminate it if possible.  There is no error number so not sure how to trap - - have played around with some dirty/false, requery, refresh at differing trigger event points but haven't been able to get a handle on this.  Would welcome input & advice.  thanks.

issue viewing filtered data in continuous form

$
0
0

I have a continuous form I'm trying to create.  I don't know how many lines will be needed, each line consists of text boxes and combo boxes.  Columns 1 - 4 are text boxes.  In column 5, I have an cboOS a combo box, options are Linux or Windows, storing the answer using the ID on tblComponents, from tblOS.  Column 6 is cboTechnology, a combo box, shows the "technology", which is filtered by which OS was selected, storing it's ID on tblComponents from tblTechnology.  At first, I couldn't get cboTechology wouldn't requery for each line, but I modified the onChange to include me.refresh.  Now each line can go from Windows to Linux and cboTechology shows the correct options.  The issue is that if line 1 is Windows, on line 2 when I select Linux, the entry for cboTechology disappears on line 1.  The data is still present on the table.  Then on Line 3, if I select Windows, the data in cboTechology disappears for line 2, but reappears for line 1.  This goes on for every line thereafter.  Here is my query for cboTechology - SELECT [tblTechnology].[ID], [tblTechnology].[Technology], [tblTechnology].[OS] FROM tblTechnology WHERE cboOS = [tblTechnology].[OS] ORDER BY [Technology];

Is there a way to make all the answers show up at the same time, no matter what line I'm editing?  I want to give this to clients, and don't want something goofy like this showing up. 

INSERT INTO with multiple UNIONS

$
0
0

Hi Folks -

I"m running into an issue trying to insert the query results into a table when I try to leverage multiple UNIONS. I also need to insert ONLY IF it already doesn't exist.

Can someone help me identify where I am going wrong?

Thank you!


INSERT INTO MasterCodeList

SELECT rdAssets.AssetId as [New Code]
, rdAssets.AssetAlias as [Alias]
, '' as [Parent Code]
, UserInfo.[Name]
, UserInfo.[Work Email]
, rdAssets.[Modified]
, rdAssets.[RequestStatus]
FROM rdAssets INNER JOIN UserInfo ON rdAssets.[Created By] = UserInfo.[ID]
WHERE ( rdAssets.[RequestStatus] = 'Published' OR  rdAssets.[RequestStatus] = 'Rejected')

UNION SELECT
  rdInvestments.InvestmentId as [New Code]
, rdInvestments.InvestmentAlias as [Alias]
, rdInvestments.AssetId as [Parent Code]
, UserInfo.[Name]
, UserInfo.[Work Email]
, rdInvestments.[Modified]
, rdInvestments.[RequestStatus]
FROM rdInvestments INNER JOIN UserInfo ON rdInvestments.[Created By] = UserInfo.[ID]
WHERE ( rdInvestments.[RequestStatus] = 'Published' OR  rdInvestments.[RequestStatus] = 'Rejected');

Combining (2) INNER JOINS with a LEFT JOIN

$
0
0

Hi Folks -

I'm having trouble adding a LEFT JOIN to one of my querys.  I have been able to add it successfully to all but 1 query and it's due to the fact the last query is the most complex as it already has (2) INNER JOINS since I'm querying (3) tables instead of (2) like he others.

Can someone help me add this LEFT JOIN?

LEFT JOIN MasterCodeList ON (PFC_RD_3Level_Flat_Expanded.[Project Code] = MasterCodeList.[New Code])

SELECT 
	rdAssets.[AssetId] as [New Code]
	, rdAssets.[AssetAlias] as [Alias]
	, '' as [Parent Code]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, rdAssets.[Modified]
	, rdAssets.[RequestStatus]
FROM (rdAssets INNER JOIN UserInfo ON rdAssets.[Created By] = UserInfo.[ID]) LEFT JOIN MasterCodeList ON (rdAssets.[AssetId] = MasterCodeList.[New Code])
WHERE (MasterCodeList.[New Code] IS NULL)
AND ( rdAssets.[RequestStatus] = 'Published' OR  rdAssets.[RequestStatus] = 'Rejected')

UNION SELECT
	rdInvestments.[InvestmentId] as [New Code]
	, rdInvestments.[InvestmentAlias] as [Alias]
	, rdInvestments.[AssetId] as [Parent Code]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, rdInvestments.[Modified]
	, rdInvestments.[RequestStatus]
FROM (rdInvestments INNER JOIN UserInfo ON rdInvestments.[Created By] = UserInfo.[ID]) LEFT JOIN MasterCodeList ON (rdInvestments.[InvestmentId] = MasterCodeList.[New Code])
WHERE (MasterCodeList.[New Code] IS NULL)
AND ( rdInvestments.[RequestStatus] = 'Published' OR  rdInvestments.[RequestStatus] = 'Rejected')

UNION SELECT
	rdPartner.[PartnerId] as [New Code]
	, rdPartner.[PartnerName] as [Alias]
	, 'TOTAL_PARTNER' as [Parent Code]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, rdPartner.[Modified]
	, rdPartner.[RequestStatus]
FROM (rdPartner INNER JOIN UserInfo ON rdPartner.[Created By] = UserInfo.[ID]) LEFT JOIN MasterCodeList ON (rdPartner.[PartnerId] = MasterCodeList.[New Code])
WHERE (MasterCodeList.[New Code] IS NULL)
AND (rdPartner.[RequestStatus] = 'Published' OR rdPartner.[RequestStatus] = 'Rejected')

UNION SELECT
	rdPartnership.[PartnershipId] as [New Code]
	, rdPartnership.[PartnershipName] as [Alias]
	, rdPartnership.[sysPartnerId] as [Parent Code]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, rdPartnership.[Modified]
	, rdPartnership.[RequestStatus]
FROM (rdPartnership INNER JOIN UserInfo ON rdPartnership.[Created By] = UserInfo.[ID]) LEFT JOIN MasterCodeList ON (rdPartnership.[PartnershipId] = MasterCodeList.[New Code])
WHERE (MasterCodeList.[New Code] IS NULL)
AND ( rdPartnership.[RequestStatus] = 'Published' OR rdPartnership.[RequestStatus] = 'Rejected')

UNION SELECT
	rdtargets.[Name] as [New Code]
	, rdtargets.[Alias] as [Alias]
	, '' as [Parent Code]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, rdtargets.[Modified]
	, rdtargets.[RequestStatus]
FROM (rdtargets INNER JOIN UserInfo ON rdtargets.[Created By] = UserInfo.[ID]) LEFT JOIN MasterCodeList ON (rdtargets.[Name] = MasterCodeList.[New Code])
WHERE (MasterCodeList.[New Code] IS NULL)
AND (rdtargets.[RequestStatus] = 'Published' OR  rdtargets.[RequestStatus] = 'Rejected')

UNION SELECT
	New_PFP_Request.[AssignedCode] as [New Code]
	, New_PFP_Request.[Alias] as [Alias]
	, New_PFP_Request.[ParentNode] as [Parent Code]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, New_PFP_Request.[Modified]
	, New_PFP_Request.[RequestStatus]
FROM (New_PFP_Request INNER JOIN UserInfo ON New_PFP_Request.[Created By] = UserInfo.[ID]) LEFT JOIN MasterCodeList ON (New_PFP_Request.[AssignedCode] = MasterCodeList.[New Code])
WHERE (MasterCodeList.[New Code] IS NULL)
AND ( New_PFP_Request.[RequestStatus] = 'Complete' OR  New_PFP_Request.[RequestStatus] = 'Rejected')



-- I am having trouble adding the LEFT JOIN to the below QUERY since it already has 2 INNER JOINS and is a bit more complex than the others
-- I need to add this LEFT JOIN:   LEFT JOIN MasterCodeList ON (PFC_RD_3Level_Flat_Expanded.[Project Code] = MasterCodeList.[New Code])

UNION SELECT
	PFC_RD_3Level_Flat_Expanded.[Project Code] as [New Code]
	, New_PFI_Request.[N_Alias] as [Alias]
	, New_PFI_Request.[N_Parent_Node] as [Parent Node]
	, UserInfo.[Name]
	, UserInfo.[Work Email]
	, New_PFI_Request.[Modified]
	, New_PFI_Request.[Request_Status] as [RequestStatus]
FROM (New_PFI_Request INNER JOIN PFC_RD_3Level_Flat_Expanded ON New_PFI_Request.[N_Alias] = PFC_RD_3Level_Flat_Expanded.[Project Alias]) INNER JOIN UserInfo ON New_PFI_Request.[Created By] = UserInfo.[ID]
WHERE (MasterCodeList.[New Code] IS NULL)
AND ( New_PFI_Request.[Request_Status] = 'Completed' OR  New_PFI_Request.[Request_Status] = 'Rejected');
Thank you!!!

Report or Query, How and What?

$
0
0

Hello,

I have multiple tables that all have the same fields and I was curious how to do the relationships or how to set up reports or queries to have all the information from each table come together. I keep them separate because they are each based on different events but they are measured in similar ways. I want to be able to create a report of which items are completed, on track, and so on based on a status field that they all have.

Sorry for the simple questions or confusion I am very new to access and stumbling my way through.

Double Click list box entry to open a form

$
0
0

Hello All,

I am just learning Access and have become very frustrated with one particular thing I'm trying to do.  I have a "Switchboard" form, which opens when the database is opened, with a listbox on it.  This listbox shows clients that need to be contacted this week.  It is based on a query called FollowUp which does the same thing.  Now, I want it to open a form to the relevant record when an entry in the list box is double clicked.  I have it set up where on double click it will open up the relevant form (frmCustomerInfo), but instead of opening the record pertaining to the line that was clicked in the listbox, it will ask for the customer phone number which is the primary key for the customer info table.  Can I get it to pull this phone number from the list box?  

I have tried a number of combinations of things of the form:

DoCmd.OpenForm "frmCustomerInfo",,,"[various things that don't work]&Me.[more stuff that doesn't work]

Thanks in advance, Please let me know if there's any other information I should add to this post.




Can I create an option group without using the wizard?

$
0
0
My Option Group Wizard is not working, no matter what I do. I've tried checking Use Control Wizards, unchecking it, starting a new form from scratch, using an existing form ... nothing. Any time I go to place an Option Group on a form in Design View, it just creates a blank box.

I understand that I need to set the Record Source for my form to the table containing the field that I want the value from this option group to go into. I've done that. I've also set the Control Source for the Option Group frame to the field in that table.

When I add radio button controls within the frame, their property sheet has a place for the Control Source, but nowhere do I see a place where I can enter the Option Value. What should the Control Source be? Same field as the Control Source for the Option Group??

Something is definitely missing in this whole structure ... Someone please walk me through it and tell me how I can set this up without the wizard!!

Microsoft Access Database won't open when macro are enabled

$
0
0

Hello,

We have some Microsoft access database .accdb files. Till yesterday those file could be opened. Today no one can open them if we click in the option: Macro are disabled. Click here to enable them. If we click and enable macros, the files just "disappear" and the page is blank.  If we let macros disabled the file can be open successfully. Any idea ? We are using Microsoft access 2013.

Can't compact Access 2010 database in a shared folder after the migration process

$
0
0

The problem emerged after moving the file server from WS2012R2 to WS2016

Firstly, in Access 2010 the base is opened from a mapped disk. Then I click compact and restore, the process of compaction begins, I see the temp file in the same folder. Process takes several minutes, but in the end I've got this error

 The compact and repair operation has been cancelled. You might not have adequate permissions to the folder that the database is located in. You need full permissions to the directory the database is located to compact and repair. Contact your system administrator for more information.

If I make a copy of the database in the safe folder or locally, I've got no error.

It makes no difference if I assign Full rights to the user explicitly for this folder.

I can successfully compact a database w/o making a copy using Access 2016 (but with a different account).

What can be done to allow users compact Access databases in shared folders?

Can't Find ODBC drivers to link MS Access 2013 and MySQL

$
0
0

Can't Find ODBC drivers to link MS Access 2013 and MySQL.

Is one available?

Thanks,

Larry

Access Timer Timer Locking

$
0
0

Hi All,

I have an access form (2013) that runs a timer event every 20 Sec and runs sql to insert (into) a few lines, only 7 lines, from the linked text file, which is continuously receiving data updates from another (non Access program), program, Metatrader 4.

Metatrader 4 is updating data to the text file maybe 10 to 30 times per seconds.  It took me a month, but I found the reason that the timer locks, randomly, every two to five hours.  Using error trapping, I found that the Insert query was unable to run (message says it can't access the "access table name called data (insert into Data ....)".  Further testing shows that the link to the text file remains in tact so I think that the execution of the insert query is "bumping heads" with the Metatrader 4 update at the exact instant of the execution of the access append query.

On Err_Handler, I added some "refresh Link" vba and a Pause function set to 5 seconds which is more that enough time to let Metatrader 4 finish its update of the text file.  The Error trap looks like this

err_Handler:

Refresh_Link

Pause5

Resume Next

These functions execute successfully but it doesn't seem to "resume next" and the form will sit for hours with the Time event NOT FUNCTIONING.

So, here is my question:

How can I keep the forms timer event running no matter what happens?  I need it to execute successfully at least every minute and, 97% of the time, it does perfectly.  How can I get that other 3%?

Many thanks



Kody_Devl







form to create junction table

$
0
0

I'm trying to create a database that I can give to clients to fill out.  They will be entering a list of servers, and a list of components to be installed on the servers.  There can be any number of components, and any number of servers and any server can have any number of components and any component can be on any number of servers.  I have tblComponets.componet in column 1 of my tblJunctionForm and tblServers.ServerName in column 2 in my tblJunctionForm junction table. 

I was thinking of having a combo box that displays the list of components with a list box that shows the servers.  Choose a component, then assign all the servers to it with a button "go".  The button would run a For Each with a SQL Insert statement (insert into tblJunctionForm  values (cboComponent,lstServerNames). 

My concern is if the client wants to double check their work, they won't see what they assigned after they move on.  If they move on to component 3, and then want to go back to component 1, the list box won't repopulate with the selection they made, right?  Is there a way around that?  I also think it would be an issue if they went and redid a component twice just because there'd be redundant data.

Is there a better way to build this Junction table?  I originally tried a continuous form, but that got too long and confusing very quickly.


Update a field on a form based on entry from another field

$
0
0

Hi,

This is my first time using a forum so my apologies if this doesn’t make sense; I’m fairly new to Access and I’m learning as I go. I’m simply trying to update one field based on entry from another field, in a data entry form. If the field is enabled ‘completed by’ I would also like to add the user id of the analyst that is doing the data entry. this information is already being grabbed from a module (UserName) and being stored in a field titled ‘supportracf’. I have the existing code below to enable the completed by field if applicable and I would like to also add the ‘supportracf’ id to the ‘completed by’ field once enabled, if that makes any sense.. I’ve tried numerous things and haven’t been able to find a solution. Any help would be appreciated.  Cheers.

Private Sub Support_Investigation_Results_Change()
If Not IsNull(Me.Support_Investigation_Results.Value) Then
    Support_Investigation_Results.DefaultValue = """" & Me.Support_Investigation_Results.Value & """"
    End If
    If Me.Support_Investigation_Results.Value = "NAT - Soft Inquiry" Then
        Me.Completed_By.Enabled = True
    End If
                
    If Me.Support_Investigation_Results.Value = "NAT - Forward to DSL" Then
        Me.Completed_By.Enabled = True
    End If
    
    If Me.Support_Investigation_Results.Value = "NAT - Forward to DPL" Then
        Me.Completed_By.Enabled = True
    End If
    
    If Me.Support_Investigation_Results.Value = "NAT - Item Blocked Per Valid Copy of Police Report" Then
        Me.Completed_By.Enabled = True
    End If
    
    If Me.Support_Investigation_Results.Value = "NAT - Forward to CDR for Review" Then
        Me.Completed_By.Enabled = False
    End If
End Sub


Stopping users from accessing data tables by connecting to front-end using Excel 'Get Data'

$
0
0

Hi everyone,

Here is my situation:

  • I have different user groups, who should not have access to each other's records. 
  • I have multiple front-end files (FE) that are locked (removed ribbons, disabled shift-key bypass, disabled navigation pane etc.). 
  • My data tables are on a back-end file (BE) that is PW protected. 
  • The files are shared on a network drive.

I've managed to implement record-level access restrictions by giving different user groups their own FE file (which has controls to limit which records they can view). Since the BE is PW protected, users cannot easily access the data tables that way. 

My issue: I've noticed that any user can create an Excel file, use the 'Get Data' functionality to link to their FE file, and get full access to the BE data tables. 

I was wondering if any of you have dealt with this before, and might know of a way to prevent users from being able to do this.

Thank you in advance,

Stan


Access 2016 - bigint support?

$
0
0

Hi Folks -

I have access 2016 but I dont have the option in "Current Database" settings for bigint support. Do I need to enable this somehow?

I'm trying to link a DB and getting #Deleted.

Thanks!

how to know which users are using the DB(access 2013) when the DB are in sharepoint?

$
0
0
hello everyone
im working in access 2013 and im trying to know which users are using the access db to manage the concurrence.
i've tried to do this:

const DB_NAME_LOCK=DataBaseName.laccdb

Dim archivo As String, texto As String

    archivo = PROJECT_PATH & DB_NAME_LOCK
    
    Open archivo For Binary As #2
    
    texto = Space(LOF(2))

    Get #2, , texto

    Close (2)
    
    If Trim(texto) = "" Then
        MsgBox "La BD NO está en uso.", vbInformation, "BD DESOCUPADA"
   end if

and it work when i used it in my local computer but when i upload to the sharepoint the previus code just work when i'm using the db and dont notice that another(s) user(s) (obviusly in other computer) is still using the db.

i will be really grateful if someone can help me

thanks in advance.

Update "Tag" attribute of a picture or vidoeo file with VBA

$
0
0

Thank you for taking the time to read my question.

I have an Access DB that is able to read all files in a folder and subfolders and get the attributes of the files like file name, date picture taken, camera model... and so on.

I'm wondering if I can update the files with Tag information using VBA. I've done a lot of searching and am getting some mixed results. Some say no, some say use a .dll, but the .dll only does certain attributes... so I'm confused.

Here is a snippet of my code:

Dim tnum As Integer
    Dim dbs As DAO.Database
    Dim rst As DAO.Recordset
    Dim i As Long
    Dim objShell As Object
    Dim objFolder As Object
    Dim objFolderItem As Object
    Dim FSO As Object
    Dim oFolder As Object
    Dim Fil As Object
    Dim SubFld As Variant

    Dim colFolders As New Collection
    Dim vFolderName As Variant
    
    Set dbs = CurrentDb
    Set rst = dbs.OpenRecordset("tblPics")
    Set objShell = CreateObject("Shell.Application")
    Set FSO = CreateObject("scripting.FileSystemObject")
    Set oFolder = FSO.GetFolder(MainFolderName)

    Me.txtDirectory = oFolder
    Me.Refresh
    
    For Each Fil In oFolder.Files
    
        Set objFolder = objShell.Namespace(oFolder.Path)
        Set objFolderItem = objFolder.ParseName(Fil.Name)
        If Right(objFolderItem, 3) = "JPG" Or Right(objFolderItem, 3) = "PNG" Or Right(objFolderItem, 3) = "AVI" Or Right(objFolderItem, 3) = "MP4" Then
            Select Case Right(objFolderItem, 3)
            Case "JPG"
                FileCountJPG = FileCountJPG + 1
            Case "PNG"
                FileCountPNG = FileCountPNG + 1
            Case "AVI"
                FileCountJPG = FileCountJPG + 1
            Case "MP*"
                FileCountMP = FileCountMP + 1
            End Select
            With rst
                .AddNew
                !FileName = objFolder.GetDetailsOf(objFolderItem, 0)
                !FilePath = objFolder.GetDetailsOf(objFolderItem, 177)
                !FileSize = objFolder.GetDetailsOf(objFolderItem, 1)
                !ImgType = objFolder.GetDetailsOf(objFolderItem, 2)
                !DateTaken = objFolder.GetDetailsOf(objFolderItem, 3)
                !DateCreated = objFolder.GetDetailsOf(objFolderItem, 4)
                !CameraModel = objFolder.GetDetailsOf(objFolderItem, 30)
                !Resolution = objFolder.GetDetailsOf(objFolderItem, 31)
                !CameraMaker = objFolder.GetDetailsOf(objFolderItem, 32)
                !ProgramName = objFolder.GetDetailsOf(objFolderItem, 35)
                !BitDepth = objFolder.GetDetailsOf(objFolderItem, 160)
                !HorizontalRez = objFolder.GetDetailsOf(objFolderItem, 161)
                !Width = objFolder.GetDetailsOf(objFolderItem, 162)
                !Height = objFolder.GetDetailsOf(objFolderItem, 164)
                !EXIFVersion = objFolder.GetDetailsOf(objFolderItem, 230)
                !ExposureBias = objFolder.GetDetailsOf(objFolderItem, 232)
                !ExposureProgram = objFolder.GetDetailsOf(objFolderItem, 233)
                !ExposureTime = objFolder.GetDetailsOf(objFolderItem, 234)
                !FStop = objFolder.GetDetailsOf(objFolderItem, 235)
                !FlashMode = objFolder.GetDetailsOf(objFolderItem, 236)
                !FocalLength = objFolder.GetDetailsOf(objFolderItem, 237)
                !ISOSpeed = objFolder.GetDetailsOf(objFolderItem, 239)
                !LightSource = objFolder.GetDetailsOf(objFolderItem, 242)
                !MaxAperture = objFolder.GetDetailsOf(objFolderItem, 243)
                !MeteringMode = objFolder.GetDetailsOf(objFolderItem, 244)
                !Orientation = objFolder.GetDetailsOf(objFolderItem, 245)
                !ProgramMode = objFolder.GetDetailsOf(objFolderItem, 247)
                !WhiteBalance = objFolder.GetDetailsOf(objFolderItem, 250)
                !SharingStatus = objFolder.GetDetailsOf(objFolderItem, 269)
                .Update
            End With
        End If
    Next

Is there such a thing as .SetDetaislOf() or something like that?

Thanks

Runtime Error 3001: Invalid Argument

$
0
0

Anyone knows how to fix the query syntax?

Thanks.

SybaseConnString = "Driver={Adaptive Server Enterprise};app=myAppName;server=myServerAddress;port=myPortnumber;db=myDataBase;uid=myUsername;pwd=myPassword;"

SyQuery = "SELECT * INTO AccessTableName FROM [" & SybaseConnString & "].[SybaseTableName]"

DoCmd.RunSQL SyQuery

Print each record to separate pdf file using certain field for filename

$
0
0

Hi all,

I have a really simple question for you, but I can not find the answer myself. I have a database solely for generating PDF files for a customer. It lists all of their electrical tools and  I want to save it to single pdf files per tool. I have set up a report but it generates one big pdf file and i don't know how to get it to split it to separate files. I know it can not be that difficult but i'm rahter a noob when it comes to coding. I can send you the database of that helps

Any insight would be greatly appreciated

Viewing all 14673 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>