473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Client Form How To Transfer ClientID to Appointments

Good Day,

I am a newbie to access. Currently running 2003 version. I have created a clients table with a command button "Schedule Estimate" which goes to my client appointments form. I am wondering if there is a way to transfer the ClientID over to the schedule estimate form when I click "Schedule Estimate". On the Client Appointments form I have ClientID, EstimateID, EstimateDate, EstimateTime. Any help is appreciated.

Thank You,

Steve
Feb 21 '08 #1
3 1378
mshmyob
904 Expert 512MB
If you have your relations setup properly then ClientID is a foreign key in your appointment table.

Create a Main form / subform and your key will be updated properly.

That is only 1 way - there are many others. You can pass it via code if you have 2 forms open

Say frmClient and frmAppointment

Expand|Select|Wrap|Line Numbers
  1. 'pass from frmClient to frmAppointment
  2. ' both forms must be open
  3. Forms!frmAppointment.ClientID = Me.txtClientID.Value
  4.  
Good Day,

I am a newbie to access. Currently running 2003 version. I have created a clients table with a command button "Schedule Estimate" which goes to my client appointments form. I am wondering if there is a way to transfer the ClientID over to the schedule estimate form when I click "Schedule Estimate". On the Client Appointments form I have ClientID, EstimateID, EstimateDate, EstimateTime. Any help is appreciated.

Thank You,

Steve
Feb 21 '08 #2
Expand|Select|Wrap|Line Numbers
  1. Private Sub ScheduleEstimate_Click()
  2. On Error GoTo Err_ScheduleEstimate_Click
  3.  
  4.     Dim stDocName As String
  5.     Dim stLinkCriteria As String
  6.  
  7.     stDocName = "Client Estimate Appointments"
  8.  
  9.     stLinkCriteria = "[ClientID]=" & "'" & Me![ClientID] & "'"
  10.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  11.  
  12. Exit_ScheduleEstimate_Click:
  13.     Exit Sub
  14.  
  15. Err_ScheduleEstimate_Click:
  16.     MsgBox Err.Description
  17.     Resume Exit_ScheduleEstimate_Click
  18.  
  19. End Sub
here is my code, if you can help with this that will help me out. I am learning therefore want to see how it would be done. Thank You.
Feb 21 '08 #3
mshmyob
904 Expert 512MB
Assuming you have no Errors just add the following after your OpenForm command.

Of course change the control names to match yours....

Expand|Select|Wrap|Line Numbers
  1. Forms!frmForm2.txtClientIDReceive.value = Me.txtClientIDFrom.Value
  2.  
Feb 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hal | last post by:
My most sincere gratitude to anyone who can help me work around this! I have work that needs to be done in javascript on the client whenever a page is unloaded. To this end, I subscribe to...
9
by: kw | last post by:
What is the proper way to get the element ID for a client script? For example, suppose in the WebControl: TextBox t=new TextBox; t.ID=this.ClientID+"X"; .... Then elsewhere we want to access...
1
by: Vaibhav Modak | last post by:
Hi All, I have a Web Service written in Java (Web Logic) and I am trying to call it in my ASP. NET client. I am facing a problem while getting the data from the Web Service Method. My Web...
3
by: SimonZ | last post by:
In ASP.NET 1.0 all client ID's of controls run at server were the same as the rendered ones on the client. In ASP.NET 2.0 the client id of server control is different on server than on the...
1
by: Andre Ranieri | last post by:
Hello, I'm trying to set up an ASP.NET 2.0 form where the user enters values in WebControls.TextBoxes for amount owing, interest and late fees and a JavaScript function totals the three values...
6
by: Welie | last post by:
I am having a problem an it's driving me crazy, I hope someone can correct my technique. I can't find a pattern and don't know where to look to debug this. The problem is on a continuous form, the...
1
by: keri | last post by:
I would like to have a combo box on a form that shows the results of a query, however the query is variable and i am unsure how to do this. I have NO knowledge of code so very basc instructions...
1
by: suzacaru7 | last post by:
HI, I am doing a database for my beutition shop. I created a table called slimming, which i store the clients info (including ID card number), the date of the appointment, the type of therapy...
19
by: hedges98 | last post by:
Sorry for the mouthful of a title! Basically, I have a form with tabbed controls (Personal/Contact Details, Referral Information, Case Info/Status etc.) and I want to add a tabbed control form...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.