?
Solved

Suform requerring a main froms txtbox urgent 500 points

Posted on 2005-03-23
6
Medium Priority
?
270 Views
Last Modified: 2008-03-17
i need to requery a txtbox on my main form when an entry is put into my sbform.

I have tried Forms!frmTimeEntry.txtOTime.Requery on an after update event dosnt work.

I cant requery the whole form due to a complex nature i will not get into.

Thanks
0
Comment
Question by:ellandrd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 27

Expert Comment

by:jjafferr
ID: 13609280
Instead of Requerying the Textbox, why don't you just add the data directly to it from the subform, like this:
Forms![Main Form Name]![Field Name]= [Your Subform Field name]

usually you want to requery a combobox so that it reflects new data.

jaffer
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 13609288
You can also requery the Main Form and after you requery, you go back to the Record you were before (so the Form will not start from Record Number one),
you can use RecordsetColon.Bookmark
0
 
LVL 16

Author Comment

by:ellandrd
ID: 13609448
you second suggestion sounds best how do i go about that?

Never used it.

Ps there is a SQL trigger on the main txt boxes that why i am going down this route
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 27

Accepted Solution

by:
jjafferr earned 2000 total points
ID: 13609530
shanesuebsahakarn wrote:

Dim ID As Long

ID=Forms!MyFourTableForm!txtID
Forms!MyFourTableForm.Requery
Forms!MyFourTableForm.RecordsetClone.FindFirst "[ID]=" & ID
Forms!MyFourTableForm.BookMark=Forms!MyFourTableForm.RecordsetClone.BookMark

This assumes that the four table form has a numeric ID field (called ID), held in a textbox called txtID. If the ID is a text field, you'd need code like this:
Dim ID As String

ID=Forms!MyFourTableForm!txtID
Forms!MyFourTableForm.Requery
Forms!MyFourTableForm.RecordsetClone.FindFirst "[ID]='" & ID & "'"
Forms!MyFourTableForm.BookMark=Forms!MyFourTableForm.RecordsetClone.BookMark


jaffer
0
 
LVL 16

Author Comment

by:ellandrd
ID: 13609673
thanks
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 13609744
you are welcome,
and thanks for the points and grade.

jaffer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question