Problem With Reading Values Between Forms

May 18, 2005

I´m new to to Access databases, so if you experties who write a solution back will keep that in mind :o

I have a mainform "frmBygninger_input" and in that form a combobox "cboParent".

In the mainform is a subformular "ufrmlDFMnøgletal", with a textbox "cboChild"

When I have choosen a value from that "cboParent", I want "cboChild" to read that values from "cboParent"

What is that I have to do?



With greetings :p

Alrun

View Replies


ADVERTISEMENT

Reading Values From A SubForm

Jan 4, 2006

Hi guys, Im working on a DatABase at the mo that is heavily featured around forms - the problem is I dont have a clue about how the code side of it is structured in access. I know a lot about visual basic, and I've been having pot shots at how to do this, but with no success...

How do I read the value of an object from a subform with macros? Lets say on my main form I have a textbox called 'ExampleTXT' - to read a value from the text box would be simple...

Code:msgbox Me.ExampleTXT

but on this form I also have a subform, which contains an array of textboxes (they link to a seperate table, so there can be any number of these textboxes) and they have the name 'ExampleARR'. How do I read the values from these? I have tried the following code (like I siad, these are random stabs in the dark) but I have had no success...

Code:msgbox Me.ExampleARR--msgbox Me.ExampleARR(0)--msgbox Me.SubFrm.ExampleARR(0)

PLEASE HELP!

View 3 Replies View Related

Queries :: Reading Values In CSV Text Inside A Query

May 13, 2014

I have a text field that contains a comma delimited list of numbers.

I am trying to read one of these numbers from OLEDB through to an access database.

I am trying to do the following:

SELECT SPLIT(CSVData, ValueNo) as ReturnValue FROM MyCSVDataTable

Where CSVData is a split field containing values like "123,234,345,..." and ValueNo is a value to identify which one i want.

Any way of achieving this using the standard SQL functions. I am reading the data via OleDB and therefore cannot use a user defined VBA function?

View 1 Replies View Related

General :: Reading Multi-line Column Values Into Array?

Aug 19, 2013

I am working on setting up a Document Control System and have a table, called List_of_SOP where I have, amongst others, the following fields:

- Document Title
- Document Number (unique identifier)
- Responsible
- DL (where this is a multiline lookup column where one ticks the names of the people to whom this document needs to be distributed)

I want to be able to fill an array with the checked values of the DL field, given a particular Document Number. So far, the code is somewhat on these lines:

Dim rs1 As DAO.Recordset
Dim rs2 As DAO.Recordset
Dim rs3 As DAO.Recordset
Dim db As DAO.Database
Dim strSQL1 As String
Dim strSQL2 As String

[code]....

View 9 Replies View Related

Forms :: Open Form By Name Not Reading Apostrophe

Mar 17, 2014

I have a button in one form that opens a different form and want it to show specific data to display. I choose this option in the command button wizard and set it up to have the name from my main form be the same name as my new form to be opened. Everything works perfectly until I choose a name that has an apostrophe in it. So if I choose the name "Ender's Game" it gives me the alert:

"Syntax error (missing operator) in query expression '[bookName]='Ender's Game".

I think I've found where the problem is, I just can't figure out how to fix it. When I looked at the onClick embedded macro it has the Where Condition as:

=="[bookName]= & "'" &[BookName] & "'"

Is there a way to get Access to accept that an apostrophe in the name is meant to be part of the string itself?

View 7 Replies View Related

Forms :: Default Values Disappear If Put Values In Text Boxes

Sep 17, 2013

In Access 2010 I have a Data Entry Form on which I have an unbound textbox in the header that the user can put a default date in. In the body of the form is a bound textbox that records the date and the default value is set as =defaultdatestat (obviously the name of the box in the header).

Problem: The default date shows up perfectly until a value is put in any of the other text boxes.

For further info : If you put values in text boxes default value disappears; if you then push escape the default value reappears when the values in the text boxes disappear.

View 4 Replies View Related

Forms :: Allowing Different Values In One Field Depending On Selected Values Of Another

Nov 22, 2013

I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list.I came up with using the .rowsource keyword. My syntax seems to be fine but I'm not getting any values under the result fields when I run the form.Here is my code so far:

Private Sub Test1_AfterUpdate()
If Me.Test1 = "Stress Echo" Or Me.Test1 = "Stress SPECT" Or Me.Test1 = "Stress PET" Or Me.Test1 = "Stress MRI" Then
Me.Test1Result2.RowSourceType = "Value List"
Me.Test1Result3.RowSourceType = "Value List"

[code]...

View 14 Replies View Related

Reading A Table From Within Another Database

May 19, 2005

I'm fairly new to access (now using for work purposes) and i've become a bit stumped...

I have a database set up and running fine, however I want to be able to generate a form in one database from a table within another. Is this possible?

Thanks for your input, It will all be apreaciated.

skelmer

View 2 Replies View Related

Reading A .txt File Using Access

Nov 16, 2004

Here's my situation. I have a .txt file that I need to bring into Access. This .txt file is set up with records that are separated by semicolons.

I need to pull this information into Access and separate the data by the semicolons. I can open the file in Excel and separate the information by using Data --> Text to Columns --> semicolon (as the separator).

Does anyone have an idea how I can do this into Access.

View 2 Replies View Related

Barcode Reading And Security

Jan 30, 2007

Hi Guys,

This might be pretty simple, but I haven't found anything on it (might not have looked hard enough!). What I am trying to do is scan a barcode label that I created in Access, when this is scanned, it goes to a table and opens the record that contains this ID and allows me to enter further data in this record. The further data will be data capture from a balance, which works fine if you select the location where the data is to go (using the mouse), what I need is for this location to be automatically accessed when I scan the barcode, hope that makes sense.
Also, is there any way in Access to either prevent data in a table from being changed once it is entered, or alternatively to mark the data as changed/edited from the original input?

Any help would be greatly appreciated.

Nigel

View 1 Replies View Related

Reading Combo.column(1)

Dec 24, 2006

on the audit trail modul

when the field is combo box I need to capture the combo's column(1) to my audit trail table

i used the code :

If TypeOf ctl Is ComboBox Then
rst("OldValue") = ctl.OldValue.Column(1)
End If

but it's not working

can any one help me with that

many thanks in advance

View 1 Replies View Related

Issue Reading # In The Recordsets

Nov 19, 2004

I am working on searching my customer number in my billing table and finding the appropriate customer and then pass the customer number onto my shipping table to find the corresponding shipping data to go with my billing data. My problem is this :

When I find my customer in my Billing table ( searching through field0 = CustomerNumber)and then select it, it won't pass the customer number to continue to search field0 in the shipping table for customers that have a # in any of the cell values of the recordset.

Is there a work around for special characters in cell data ie) #

Any sugestions or comments would be greatly appreciated.

View 4 Replies View Related

Reading Data From Spreadsheet

Nov 23, 2004

I have a linked spreadsheet. Access is not pulling certain records from the field DOD. The code I used is as followsSELECT final.[SSN P ], final.TXPD, final.[TC-530], final.[TC-150], final.[ DOD ], final.[ DOB ], final.[SSN S ], final.[TC-421], final.[TC-420], final.[TC-424], final.[TC-540], final.[LFRZ-RFRZ], final.[TC-590], final.[TC-591], final.[TC-594], final.[TC-599], final.[TC-290], final.[TC-291], final.[TC-300], final.[TC-301], final.[TC-976], final.[TC-977]
FROM final
WHERE (((final.[TC-530])="TC-530")) OR (((final.[TC-150])="TC-150")) OR (((final.[ DOD ])="dead")) OR (((final.[ DOB ])>1929 And (final.[ DOB ])<1986)) OR (((final.[SSN S ]) Is Not Null)) OR (((final.[TC-421])="TC-421")) OR (((final.[TC-420])="TC-420")) OR (((final.[TC-424])="TC-424")) OR (((final.[TC-540])="TC-540")) OR (((final.[LFRZ-RFRZ])="-AL")) OR (((final.[TC-590])="TC-590")) OR (((final.[TC-591])="TC-591")) OR (((final.[TC-594])="TC-594")) OR (((final.[TC-599])="TC-599")) OR (((final.[TC-290])="TC-290")) OR (((final.[TC-291])="TC-291")) OR (((final.[TC-300])="TC-300")) OR (((final.[TC-301])="TC-301")) OR (((final.[TC-976])="TC-976")) OR (((final.[TC-977])="TC-977")) OR (((final.[LFRZ-RFRZ])="-ALR")) OR (((final.[LFRZ-RFRZ])="-L")) OR (((final.[LFRZ-RFRZ])="-LBR")) OR (((final.[LFRZ-RFRZ])="-LBRK")) OR (((final.[LFRZ-RFRZ])="-LR")) OR (((final.[LFRZ-RFRZ])="-LRF")) OR (((final.[LFRZ-RFRZ])="-LRKF")) OR (((final.[LFRZ-RFRZ])="-LW")) OR (((final.[LFRZ-RFRZ])="-O")) OR (((final.[LFRZ-RFRZ])="-OLR")) OR (((final.[LFRZ-RFRZ])="-V")) OR (((final.[LFRZ-RFRZ])="-VL")) OR (((final.[LFRZ-RFRZ])="-VW")) OR (((final.[LFRZ-RFRZ])="-W"));


For some reason the DOB and DOD fields are not being recognized. Please help.

View 2 Replies View Related

Reading File Names

Dec 9, 2004

Is there a way for a access to read the filenames of files contained in a folder on the local machine and paste
those filenames in a database field?

View 1 Replies View Related

Tables :: Fields Not Reading The Same?

Jul 22, 2013

I am very new to Access and I am not a programmer at all. Something in my program changed and I am stuck on how to correct it. When I look at the front end everthing looks fine. When I look at the back end one of my fields are no longer reading correctly. I get the message error code 2465

View 14 Replies View Related

Modules & VBA :: DLookup Only Reading Top Row

Jun 26, 2015

I have a command button on a Access 2010 form that i am using as my switchboard. On this form i have a hidden unbound text box that captures the users environ"username". When the user hits a command button on the form the code looks at the name in the hidden textbox that captures the environ"username" and then DLooks up a table to see if there is a match. If yes then it will open the next form and if not then a message box appears.

Code:
Private Sub Command6_Click()
Dim TxtUsername As String
If Me.TxtUsername = DLookup("[OneLondon Login]", "TblAccessUsers") Then
DoCmd.OpenForm "Bakerloo_Main_Form"
Exit Sub
Else
MsgBox "You do not have permission to access this database"
End If
End Sub

This works fine apart from the fact it will only read the first name entered in the table. This table(TblAccessUsers) could have up to 50 names in it and possibly have names removed and re added at a later date. Is there a way i can get the code to look up every name in the table ??

View 3 Replies View Related

Security Question..after Reading Many Posts..

Jun 16, 2005

I didnt find answer to my question!..
Hope someone here can help..

I just added security to my access application...
I have added a new user and gave all admin rights. Removed all permissions from Admin and Admins group. When I log on as this new user who is equivalent of Admin,

I am able to doubleclick the table(linked table) and modify/delete the data..but when I the form is executing, it says, "Records cannot be read, no read permission on <Table>"

Hope someone can answer my question.

Thanks very much.

View 1 Replies View Related

Apply 'save Formatted' To Reading?

Jul 2, 2007

I have a DB with tables where the primary key fields are autoincremented, but with formatting applied.

Formatting is for example "CC"000000 so record 1 will be CC000001.
(each table has a different alpha prefix)

This works fine, except the database content is being read by another application, and it sees only the 1, 2, 3 etc.
Exporting the data to Excel format proves that this is due to Access not the other application.

However, if I export to Excel format, and tick the "Save Formatted" option, the data exported is as I require, CC000001, CC000002 etc.

Is there a setting or way to make Access present the data when it is read by another application to be the 'formatted' version of the data?

View 2 Replies View Related

Reading Excel Spreadsheet From Access??

Sep 14, 2004

I am trying to connect to an excel spreadsheet and read it from access. What is the object naming scheme in excel?? I am trying to read "Sheet1" but I am getting an error. My final goal is to export a list of forms and queries list in the excel spreadsheet from one database to another. How do I know if I have "Excel 8.0"?? Here is my code:

Sub ImportForms()
Dim cnn1 As New ADODB.Connection
Dim rst1 As ADODB.Recordset
Dim strExcelPath As String

strExcelPath = "C:ModificationRequest.xls"
'Open and set recordset
cnn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strExcelPath & ";" & _
"Extended Properties=Excel 8.0;"

Set rst1 = New ADODB.Recordset
rst1.CursorType = adOpenKeyset
rst1.LockType = adLockOptimistic
rst1.Open "Sheet1", cnn1, , , adCmdTable

'Open Recordset and print test record
Debug.Print rst1.Fields(0).Value, rst1.Fields(1).Value
'Clean up objects
rst1.Close
Set rst1 = Nothing
cnn1.Close
Set cnn1 = Nothing

End Sub

View 1 Replies View Related

General :: Reading DB File Information?

Sep 29, 2013

I see a lot of requests for this operation, but apparently .DB files are so general that sometimes it's impossible? Any all-encompassing program that can read files like this? I believe they come in different formats and are produced by a variety of different programs. The only thing I ever see though are files with [.db] as the extension.

If I open the one I have with notepad on a windows machine I see some of the info but some of it is not there and is garbled.

[URL]....

View 4 Replies View Related

Reading Appending To A Table, From A Manipulated Input

Apr 1, 2007

Hi,
I need to grab a record from an input table/record set and de-concatenate it based on the underscore and append each instance to an output table. I know this must be possilbe, we do simular things in GIS programming all the time. Below is my "logic"/psuedo code :)

'loop until end of file
strColumnA = tblNewRelationships.PLACE
strColumnBin = tblNewRelationships.NAMES
'loop until strColumnBout is ""
strColumnBout = Left(strColumnBin, Find("_", strColumnBin, 1) - 1)
strColumnBchop = Right(strColumnBin, Len(strColumnBin) - Len(strColumnBout) - 1)
strSQL = "" 'put strColumnA into tblRelationships_2.PLACE and strColumnBout into tblNewRelationships.NAME
DoCmd.RunSQL strSQL
strColumnBin = strColumnBchop
'end field loop
'end row loop

Any help is seriously appreciated.
Thanks,
C

View 2 Replies View Related

Modules & VBA :: Reading Control Value From Public Function?

Oct 4, 2013

I am trying to read the value of a control on an open form from a Public Function in a Module with no luck. I suspect the issue is syntax.

Code:

Public Function MyFunction(varFormName As String, varControlName As String)
If Forms(varFormName).Controls(varControlName) = True Then ' = 0 even when control is -1
Else
End If
End Function

The variables pass through fine but the If statement equals zero regardless of the state of the form's control. I tried several variations to no avail.

If Forms(varFormName).Form.Controls(varContactControl ) = True Then
If Forms(varFormName)!Form.Controls(varContactControl ) = True Then
Etc.

View 4 Replies View Related

Modules & VBA :: Split Database - Reading Records

Jul 2, 2013

My database was working fine until I split the database and now I'm having issues with this function:

Code:
Public Function OpenFirstAttachmentAsTempFile(ByRef rstCurrent As DAO.Recordset, ByVal strFieldName As String) As String
Dim rstChild As DAO.Recordset2
Dim fldAttach As DAO.Field2
Dim strFilePath As String
Dim strTempDir As String

[Code] ....

It's getting stuck on the "strFilePath = strTempDir & rstChild.Fields("FileName").Value" line. The debugger says that there is no reord. The strTempDir is correct. I am assuming that the issue has to with linking to the database.

View 6 Replies View Related

Queries :: Reading Dates From A Formatted Field

Jun 12, 2013

In order to perform conflict searches in my Access 2007 database, you enter a bunch of information and then receive a report of cases with similar information in order to avoid any conflicts of interest.One of the fields is "Date of Accident". Currently I have its format set as yyyy/mm/dd. However, my expression

Code:
Date Searched: [Forms]![frmConflictSearch]![Date of Accident]

returns nothing (if I look at the query in Datasheet the column is blank).I found a fix for getting it to appear by removing the format on Date of Accident, however, my query doesn't retrieve cases with matching dates (the dates are formatted to dddd, mmmm dd, yyyy as a Date/Time Data Type).Is there any way I can get the query to both return the date searched, AND retrieve matching cases?

View 4 Replies View Related

Reading Data From Access Database In Excel

Feb 9, 2015

I have created an Access database that stores a significant amount of information about our products. I have an excel spreadsheet that performs calculations on that data. I have used the import data from Access tool in Excel to import the data. The problem I have is when the excel spreadsheet is open no one can modify my Access database.

Is there a way to have Excel open and still be able to work on the database in Access? When the user on Excel needs updated information they can just hit the "refresh" button and everything up to that point that has been done in Access will update. I do not want Excel to be able to manipulate or change any values in my Access database.

I am using Access 2007....

View 5 Replies View Related

Forms :: Hide Unchecked Values In A Listbox - Create Hyperlink On Listbox Values?

Jan 20, 2014

Firstly, is it possible to hide unchecked values in a listbox? I have a user with several roles and I want to only show the ticked roles in the listbox.

Secondly, can you create a hyperlink on listbox values? i.e, if I click on "Manager" in the roles listbox, it follows that to another form and opens the record about managers?

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved