Using A Form-displayed GUID In Record Source Criteria?

Oct 26, 2006

I am having some problems with an Access database, obviously.. relatively new at the whole thing, so it's quite a patched-up mishmash, and I would be happy to expand on the intended structure, but it would all come together if there's a way to use a form-displayed GUID as a record source criteria.

Essentially, I can do the following:

Form 1 with autonumber GUID 1 has a text field on it which is equal to the autonumber GUID 1 field for the current record. This looks like a series of random characters, nothing like the long number, and it's set to be invisible. It then works, on a subform, to set record source criteria to include this text field as a way to delimit subform 2 by (non-autonumbered) GUID1.

However, what does not work is:

Form1 has an unbound lookup list that includes GUIDs as one of the things displayed. These are displayed properly, as a long number. I can set a text field equal to the value of this on the main form, and see the same long number. But I cannot then reference this text field as a criteria for the subform record source, and neither can I reference the lookup list directly. Essentially, it works when the text field is showing squiggly numbers, but not when showing the 'real' GUID.

Is there a way to convert the nice-and-tidy looking GUID from an unbound lookup list to something usable as a record source criteria? Or is this always possible, and I am just missing something elsewhere? I can do this through VBA for a _filter_ criteria with the ={guid " & guidvariable & "}))" thing, but haven't found a way for record sources.


The structure is rather convoluted.. would be happy to explain if there's no other way to do it. Replies greatly appreciated.

View Replies


ADVERTISEMENT

Forms :: Using Subform As Record Source Criteria

Apr 16, 2013

I am trying to get a follow-on form to reference a subform. Here is what I currently have going:

I have two (2) tables: 00 Orders and 00 Products; both forms have primary keys "Orders ID" and "Product ID" respectively.

The "Orders ID" in "00 Orders" has a one-to-many relationship to "Orders ID" in "00 Products".

The user adds the main order details to "00 Orders" Table via "01 New Order" Form, and adds the ordered products to "00 Products" Table via a "00 Products Sub Add" Subform.

The user can then update the order via "02 Update Order" Form which has a "00 Products Sub Update" Subform.

This is working perfectly!

The "00 Products Sub Update" Subform has a "Contr Details" Button for each product ordered which opens a follow-up "00 Products Sub Update Contract Details" Form to allow the user to add additional details to the "00 Products" Table. I did this to reduce the size of the main form as the additional details are not needed to be viewed as the order process is going through the stages.

In the Record Source of this "00 Products Sub Update Contract Details" Form I have the criteria for the "Product ID" set to [Forms]![00 Products Sub Update]![Product ID]. This ensures only the additional details for the selected product come up on the form.

Everything works perfectly; I can add new orders, I can update orders, and the selected product comes up when I press the "Contr Details" Button on the "00 Products Sub Update" when it is a stand-alone Form.

What the problem is, Access asks for the user to "Enter Parameter Details" for "Forms!00 Products Sub Update!Product ID" when the "Contr Details" Button is selected in the "00 Products Sub Update" when it's a subform within the mainform.

So everything works when I use "00 Products Sub Update" as a Form by itself, but Access does not seem to be seeing the "Product ID" when "00 Products Sub Update" is a subform.

View 14 Replies View Related

Getting ID Of Current Record Displayed On A Form

Jun 14, 2012

I am having trouble getting the ID of the current record displayed on a form. The code I have written is this:

Code:
Dim ProjID As Long
ProjID = Forms![ProjectDetailsAll].CurrentRecord

The problem is that this code returns the record number relative to other records (so, this record is number 2634 of 2634). However, I am trying to get the ID of the record, which is an autonumber and is not the same as the record's order amongst other records. There have been record deletions ahead of this record, so the ID might be 3096 even though CurrentRecord tells me that this record is number 2634. Is there another way of writing this to get what I need?

View 3 Replies View Related

Manually Changing Displayed Record On A Form

Mar 7, 2006

I have a form that is linked to a table. tblContacts

On the form I have added a listbox which has every possible Contact (Name) listed. I wanted to be able to click on a contact name and then have the form bring up all the information related to the contact.

right now i have on the click of the listbox a msgbox that gives me the contact id associated with the contact name.

BTW, this is a project i am taking over from someone. If it was my choice I would be creating a web app.

View 2 Replies View Related

Forms :: Send Single Record Displayed On Form Not All Records

Apr 21, 2015

I've created a button on my ACCESS 2010 form that will send a PDF via email. However I only need to send the single record displayed on the form not all records.

The on click command of the button sends the PDF of the report. (I read that this is what should be sent; but still get the same results.)

I don't understand how and where to attach VBA code:

Me.Filter = "RequestsID=" & Forms![OD Reversal Requests]![RequestsID]
Me.FilterOn = True

View 5 Replies View Related

Forms :: Change Backcolor Of A Field On Current Record Displayed In Multiple Items Form

Apr 8, 2013

I wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.A.backcolor = makes refrence to all fields called A on the 'multiple items' form and therefore all fields change colour not just the current record.

View 2 Replies View Related

Alternatives To GUID?

Jul 28, 2007

My company has satelite offices, which will be using database as well. For security and performance reasons, it is not feasible to have them connect to central server for a central back-end. (This may be different if we used a SQL backend, but migration takes time so that will need to wait).

My idea was I'd provide each satelite office their own local backend and have backend transmit the data to a central backend on a server which is fully replicated periodically while not in business. This would give the best balance between performance, security and network traffic.

But that creates the problem of possible conflicts between records' keys. I'm looking at GUID, and based on the amounts of records we usually do, I'm thinking GUID is a bit too excessive.

Maybe anyone can make suggestions if there's another way to prevent key conflict when the local backend and central backend synchronizes?

View 4 Replies View Related

Change The Sub Form’s Record Source

Nov 16, 2005

I have a main form that has 10 sub forms Each sub form’s record source is link to a different Query.

It takes more then a minute to open the form, (because it’s running the query for all sub forms). So I changed the sub forms source to SELECT * FROM tblTest WHERE false;

I also changed the main form. When the button on the main form is clicked, it’s adding the following:

Me.SubMySub.Form.RecordSource = "select * from qMyQuery"
Me. SubMySub.Form.Requery

However, after I close the main form, the sub form’s record source stays linked to
SELECT * FROM qMyQuery;

And will take the same long time again to open the main form.

Does anyone have any solution?

View 7 Replies View Related

How To Use Same Form By Changing Record Source?

Feb 8, 2005

Hi all,

I have Form F_CashSalesHead with a subform F_CashSalesInvFoot with one-2-many relationship on their tables. Subform contains a checkbox field that I use to lock the record set (On a command button click it runs one update query to add value 1 to each checkbox to make Enable=False all the records of current invoice on the form).

One-2-many relation ship is made on InvNum field in both tables.

When I open F_CashSalesHead form, bcz of some code line I wrote on On Load event of F_CashSalesHead , at the beginning it give massage how many invoices are pending to lock and would you like to see. If click “Yes” to see list, it opens a small form that called F_Count_Unlocked_Invoices showing invoice numbers and unmarked checkbox which is pending to lock. This small form is based on following query,

SELECT DISTINCTROW T_CashSalesInvFoot.InvNum, T_CashSalesInvFoot.CashSalesCustomerName, Sum(T_CashSalesInvFoot.Lock_Cash_Inv) AS [Sum Of Lock_Cash_Inv]
FROM T_CashSalesInvFoot
GROUP BY T_CashSalesInvFoot.InvNum, T_CashSalesInvFoot.CashSalesCustomerName
HAVING (((Sum(T_CashSalesInvFoot.Lock_Cash_Inv))=0));

This works fine.

What I am looking for is, I want to use the same F_Count_Unlocked_Invoices form for Credit Sales invoice also with the same trick. Because I don’t want to create another same form and write code that help to increase size of db.

Can it be done just by changing record source of form F_Count_Unlocked_Invoices? Or what is the way to do it?

With kind regards,
Ashfaque

View 2 Replies View Related

Cascading Form Record Source

May 17, 2005

Heya. I hate posting yet another cascading query but I just poured through the first 40 bits and couldn't find something similar.

Basically, I seem to have an errored idea in how to effectively used cascading boxes on a larger form-wide scale.

Basically I have a form with an unbound combobox in the form header: cboSchool

The detail section should only have two fields, StudentID (txtStudentID) and a boolean (bolOT) both of which exist in a specific table source (tblStudents). StudentID is a locked field.

What I would like to do is only have the StudentID's available that are valid for the school. I attempted using a query in the record source that would reference cboSchool but I keep ending up with blank forms. (There's a string of queries that link the schools found in cboSchools to StudentID)

Any ideas?
~Chad

View 5 Replies View Related

Record Source Problem On Form

Jan 10, 2006

Hello,
I'm having a strange problem and was wondering if anyone can help me out. I have a form that is for inputting and modifying data in one table. It used to work when you opened the form you would see x amount of records. Now it's opening to 1 blank record. If you hit filter it fliters like 1700 records and then when you unclick it, you get the entire 10000 records. I thought it had something to do with the Record Source in the properties but when I fixed that it still didn't work. Any ideas?
Thank you!

View 2 Replies View Related

Get The Recordset From The Record Source Of A Form

Aug 31, 2004

I have 2 forms. On form1, the record source is a query. From form2, I need to iterate through the recordset from form1 and perform some action. How do I access the recordset from form1?

Thanks in Advance,
-jnoody

View 1 Replies View Related

Forms :: Record Source Set From Another Form

Jun 19, 2014

This code loads a new subform in the frame. It then scopies a value to an input field but then i need to set the record source and display the data. This latest pasrt does not work.I've been trying for some time now by changing the part before recordsource but no luck.

Code:
gekozenwo = Me.Keuzelijst0
Forms!switchboard.subfrmWindow.SourceObject = "frmInformation"
Dim frm As Form
Set frm = Forms!switchboard.subfrmWindow.Form
frm.DataEntry = True
Forms!switchboard.subfrmWindow.Form!Tekst33 = gekozenwo
MsgBox gekozenwo

frm.RecordSource = "SELECT * , [orders_maint_detail]![woisnr] & ' / ' & [orders_maint_detail]![Ordernummer] AS Expr1 " _
& "FROM orders_maint_detail " _
& "WHERE (((orders_maint_detail.woisnr)='" & gekozenwo & "'));"
Me.Requery
wonr = gekozenwo

View 2 Replies View Related

Remove Record Source/Control Source

Sep 19, 2005

I have an unbound form with three tabs. On each tab there is a sub form. Each tab is a search form and each sub is a results returned. I have made everything unbound and set the sub form recordsource and its controls control souce on afterupdate of the main form search criteria. Works fine except for after some use the db decides the sub forms are not unbound and sets the record source and control sources.

I'm trying to do a

Me.PollingPlacesResults.Form.RecordSource = ""
Me!PollingPlacesResults!PollID.ControlSource = ""


but this does not seem to work in actualy removeing the record source and control source.

View 14 Replies View Related

Having A List Of Record Names Displayed And Opening The Full Record Via Click

Sep 13, 2005

Im not sure if this is the right place to put this but I was wondering if you could help me:

Say I have database with forms that display records or people ie name, address, postcode, etc. What I want to do is display a list of Names then from that list I can double, single click and open the record details.

Id call my self and amatuer at access and am probably guessing this is done via vscript or something else, but any help will do.

Thanks
Alex

View 14 Replies View Related

Dynamic Query And Record Source In A Form

Feb 23, 2005

I have Form A that has a combo box and a "Submit" button. When the user clicks on the Submit button it needs to open Form B. Recordsource of this Form B is "Query B"

Item selected on the combo box becomes the criteria for "Query B and Form B needs to be opened based on that criteria.

What is the easiest and fastest way (no dlookups please!) to do this?

If an illustration is possible through an example that will be wonderful.

Thanks in Advance.

View 1 Replies View Related

Record Source For One Form Multiple Tables

Mar 26, 2005

I am making a master form for three tables which ultimately form a hierarchy. I am getting all the fields from each table onto one form. By default the record source would be made up of an INNER JOIN such as below

SELECT PERSON.first_name, PERSON.country, PERSON.last_name, PERSON.street, PERSON.area, PERSON.city, PERSON.telephone, CONTRIBUTOR.registration_date, CONTRIBUTOR.fav_category, MUJAHED.profession FROM (PERSON INNER JOIN CONTRIBUTOR ON PERSON.id=CONTRIBUTOR.id) INNER JOIN MUJAHED ON CONTRIBUTOR.id=MUJAHED.id;

I'm trying to change the record source to match using the where clause instead. However the following allows me to view but not add a new record

SELECT PERSON.first_name, PERSON.country, PERSON.last_name, PERSON.street, PERSON.area, PERSON.city, PERSON.telephone, CONTRIBUTOR.registration_date, CONTRIBUTOR.fav_category, MUJAHED.profession
FROM PERSON, CONTRIBUTOR, MUJAHED
WHERE (PERSON.id = CONTRIBUTOR.id) AND (CONTRIBUTOR.id = MUJAHED.id);

A tip or guideline on how I can correct this will be appreciated.

Regards

View 1 Replies View Related

Data Entered In Form To Record Source

Aug 26, 2005

I have a form where users enter data in various ways - combo boxes with drop down selections and text boxes where users manually enter some data. I also have several text boxes that return "answers" based on calculations from user entries mentioned above. The form is bound to a table where all the entered data is stored. I'm having trouble saving the calculated information to the bound table. It's easy in all the non-calced boxes, I just put the column name of the bound table in the control source, but in the calculated fields, I already have the formula in the control source. How can I identify the proper column to save the data in this case.

Thanks!

View 5 Replies View Related

How To Change The Record Source Of A Report From A Form

Sep 22, 2005

I'm looking to change the record source of a report and then print the report depending on what button the user clicks on.

Is there some way to do this?

View 8 Replies View Related

Form - Record Source - Select A Table

Nov 13, 2013

Form - record source - select a table that when the user enter a value in the field of the form it gets place into the designated table (select a table). my problem is that I have two fields in the form, one field from the data entry is suppose to go to the train table,and another field the data entry is suppose to go to the station table. if I have the form's record source have a designated table for the data entry.It doesn't have two tables for the data entry.

View 13 Replies View Related

Modules & VBA :: Open Filtered Form With Record Source Set

Dec 17, 2013

In my Access adp, when I open a certain form (frmVertebrates), the databinding occurs in the Load event for the form, for various reasons. I have not specified any datasource in the form's design view.

Databinding for frmVertebrates:

Code:
Me.Form.RecordSource = "select * from dbo.vertebrates where catalogID=3"

This works great when just opening the form. However, when opening with a filter from a button on another form it won't work, the form displays all records.

Button code:

DoCmd.OpenForm frmVertebrates, , , "vertID=123"

Obviously, this makes sense, since the record source is explicitly set in the Load event.

Is there a way to capture the filter "vertID=123" so it can be added to the Form.RecordSource sql?

When breaking in the Load-code and watching the 'form' variable, I can't spot the filter condition anywhere...

View 4 Replies View Related

Reports :: Set Record Source Of Report From Button On Form

Jun 13, 2014

How can I set the record source of a report to a saved query through VBA. I am trying to use the same report for a number of uses, all of the info on the report is the same, but the only difference is the query that the information is based on. I have this simple code below, how do I add a record source to it (if it can be done)

DoCmd.OpenReport "SellRPT", acViewReport, , , acNormal

View 2 Replies View Related

Forms :: Split Form Ignoring Record Source?

Jan 15, 2014

Access 2013 on a Window 8.1 system.

I have a combo box based on a look-up table which I use to filter the records in the form. Seems after closing the form and reopening it, the filter remains.

I'm not sure if this is referred to filtering or restricting the records.

The value in the record source doesn't get changed but the records displayed don't reflect this. The records shown are the last filter I selected in the combo box.

The only work around I have found is I must explicitly set the record source in the on open of the form.

The was not occurring with access 2010. And I have made no changes what-so-ever.

View 5 Replies View Related

Forms :: Filter Form Using A Query Not In Record Source

Aug 20, 2013

I have one form which houses all my product information via the use of a query and subforms where appropriate. I would like to filter it in order to find records missing certain information.

I want to filter the information using a combo box.

The combo box has a user friendly name (Product Dimensions) and the name of a query related to that name (qryfilter_missing_prod_dims - this query is the record source query for the form plus the query that has the missing info, the query is set to return all records that match ie. all records that are missing info).

I want to write a vba code to filter my form based on that query.

And i can't get it to work using the cmd.applyfilter (docmd.applyfilter me.cbo_missing)

I've also tried to use me.recordsource. when i do it filters perfectly, but i can no longer edit any of my data in the form.

How to filter my form using a query that is not in the native form's record source?

View 3 Replies View Related

Form That Is Linked To A Query By Its Record Source - DCount?

Mar 25, 2015

I have a form that is linked to a query by its Record Source.In one of the Text boxes I want to appear the number of rows in the query where Days = 4 so I thought I would try to use DCOUNT as the Control Source for the Text Box. However every expression I try for DCOUNT throws back error? or name?. How to sort my code?

=DCount("[EPISODEUNIQUEKEY]","1-12 Show Records by Date Range","[Days] = '4'")

View 3 Replies View Related

Display Field From A Query On A Form Not In The Forms Record Source

Jul 27, 2005

In short can I display a field on a form that is not in the forms field list without using a sub-form? I am trying to show a value from a query on this form. I tried this in the control source:
[qry_op500_entry_delta]![countofphone model]
I get an error stating that this is not in my field list for the form.
If the answer is No or if needed I can give more information on what I am trying to do.

View 6 Replies View Related







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